]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: conf: Claim the proper range for signed numbers
authorAndrea Bolognani <abologna@redhat.com>
Fri, 15 Jul 2016 15:47:01 +0000 (17:47 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 18 Jul 2016 13:49:57 +0000 (15:49 +0200)
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).

src/util/virconf.c

index 2d422277df069365845b8cd6a62fff92f8212b39..6e1d2f42be8e95e0e03ac854235ee89649753b62 100644 (file)
@@ -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) {