From 582147d7fe4e67fdadfb30bf696919c7ef8594d7 Mon Sep 17 00:00:00 2001 From: pilsnerish <18150523+pilsnerish@users.noreply.github.com> Date: Sat, 30 Dec 2023 17:21:31 -0500 Subject: [PATCH] Change conf_write to return 0 or 1 H/T @olivierbutler who also had this idea Fixes https://github.com/skiselkov/libacfutils/issues/38 --- src/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index f44e684..ab089e7 100644 --- a/src/conf.c +++ b/src/conf.c @@ -676,7 +676,7 @@ conf_write_impl(const conf_t *conf, void *fp, size_t bufsz, bool_t conf_write(const conf_t *conf, FILE *fp) { - return (conf_write_impl(conf, fp, 0, B_FALSE, B_FALSE)); + return (conf_write_impl(conf, fp, 0, B_FALSE, B_FALSE) >= 0); } /**