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.
This commit is contained in:
Andrea Bolognani 2016-07-15 17:20:03 +02:00
parent 40bd972344
commit 17b390fa85

View File

@ -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 {