genconf: properly check retval of confnode_strvalue_to_boolvalue()
[libcmdline.git] / src / genconf / confnode.c
index ed5bd91..3af3cd3 100644 (file)
@@ -206,7 +206,7 @@ int confnode_dotconfig_write(const struct confnode *n, FILE *f)
        if (confnode_get_value(n, buf, sizeof(buf)) < 0)
                return -1;
        val = confnode_strvalue_to_boolvalue(n, buf);
-       if (val < 1)
+       if (val < 0)
                return -1;
 
        if (val == 0) {