From 17b390fa85c73a67b616fcb3510a4abc3fb5e0d1 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Fri, 15 Jul 2016 17:20:03 +0200 Subject: [PATCH] util: conf: Clarify choice between VIR_CONF_LONG and VIR_CONF_ULONG We use unsigned long long integers unless we need to store a negative value. Rewrite the condition to make this more obvious. --- src/util/virconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index f2d543c4ff..eb55a1a16b 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -545,7 +545,7 @@ virConfParseValue(virConfParserCtxtPtr ctxt) _("numbers not allowed in VMX format")); return NULL; } - type = (c_isdigit(CUR) || CUR == '+') ? VIR_CONF_ULONG : VIR_CONF_LONG; + type = (CUR == '-') ? VIR_CONF_LONG : VIR_CONF_ULONG; if (virConfParseLong(ctxt, &l) < 0) return NULL; } else { -- 2.47.2