From d95a1e1bbf95cd09e1e9339386cec6aec0ab1921 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 24 Dec 2010 13:14:56 +0100 Subject: [PATCH] genconf: in choice node, when value is "", it means no value Signed-off-by: Olivier Matz --- src/genconf/confnode_choice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/genconf/confnode_choice.c b/src/genconf/confnode_choice.c index 20e1efb..cb36658 100644 --- a/src/genconf/confnode_choice.c +++ b/src/genconf/confnode_choice.c @@ -150,6 +150,8 @@ static int confnode_choice_set_user_strvalue(struct confnode *n, static int confnode_choice_get_user_strvalue(const struct confnode *n, char *buf, unsigned buflen) { + if (strcmp("", n->value) == 0) + return -1; snprintf(buf, buflen, n->value); return 0; } -- 2.20.1