mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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:
parent
40bd972344
commit
17b390fa85
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user