From: Andrea Bolognani Date: Fri, 15 Jul 2016 15:20:03 +0000 (+0200) Subject: util: conf: Clarify choice between VIR_CONF_LONG and VIR_CONF_ULONG X-Git-Tag: v2.1.0-rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17b390fa85c73a67b616fcb3510a4abc3fb5e0d1;p=thirdparty%2Flibvirt.git 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. --- 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 {