[PATCH 4/8] util: conf: Claim the proper range for signed numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virconf.c b/src/util/virconf.c
index 2d42227..6e1d2f4 100644
--- a/src/util/virconf.c
+++ b/src/util/virconf.c
@@ -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) {
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]