From 3d6e3c59806bca2daf079e4467fb54f73c477bb6 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 24 Dec 2010 13:05:16 +0100 Subject: [PATCH] genconf: properly check retval of confnode_strvalue_to_boolvalue() Signed-off-by: Olivier Matz --- src/genconf/confnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.20.1