提交 a6a1cb6a 编写于 作者: A Andrea Bolognani

util: conf: Claim the proper range for signed numbers

virConfGetValueLLong() errors out if the value is too big to
fit into a long long integer, but claims the supported range
to be (0,LLONG_MAX) instead of (LLONG_MIN,LLONG_MAX).
上级 1835cd53
......@@ -1318,8 +1318,8 @@ int virConfGetValueLLong(virConfPtr conf,
if (cval->type == VIR_CONF_ULONG) {
if (((unsigned long long)cval->l) > LLONG_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("%s: value for '%s' parameter must be in range 0:%lld"),
conf->filename, setting, LLONG_MAX);
_("%s: value for '%s' parameter must be in range %lld:%lld"),
conf->filename, setting, LLONG_MIN, LLONG_MAX);
return -1;
}
} else if (cval->type != VIR_CONF_LONG) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册