From: Olivier Matz Date: Fri, 24 Dec 2010 12:05:16 +0000 (+0100) Subject: genconf: properly check retval of confnode_strvalue_to_boolvalue() X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3d6e3c59806bca2daf079e4467fb54f73c477bb6;p=libcmdline.git genconf: properly check retval of confnode_strvalue_to_boolvalue() Signed-off-by: Olivier Matz --- diff --git a/src/genconf/confnode.c b/src/genconf/confnode.c index ed5bd91..3af3cd3 100644 --- a/src/genconf/confnode.c +++ b/src/genconf/confnode.c @@ -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) {