]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: conf: Use long long when parsing
authorAndrea Bolognani <abologna@redhat.com>
Fri, 15 Jul 2016 11:53:57 +0000 (13:53 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 18 Jul 2016 13:49:57 +0000 (15:49 +0200)
Commit 6381c89f8cce changed virConfValue to store long long
integers instead of long integers; however, the temporary variable
used in virConfParseLong() was not updated accordingly, causing
trouble for 32-bit machines.

src/util/virconf.c

index 33d6d9283b1cb5aac76c89a06b1c494ac4ee9bc6..66f81442895e879899380d5d555e391b4dda37ec 100644 (file)
@@ -364,9 +364,9 @@ virConfSaveEntry(virBufferPtr buf, virConfEntryPtr cur)
  * Returns 0 in case of success and -1 in case of error
  */
 static int
-virConfParseLong(virConfParserCtxtPtr ctxt, long *val)
+virConfParseLong(virConfParserCtxtPtr ctxt, long long *val)
 {
-    long l = 0;
+    long long l = 0;
     int neg = 0;
 
     if (CUR == '-') {
@@ -476,7 +476,7 @@ virConfParseValue(virConfParserCtxtPtr ctxt)
     virConfValuePtr ret, lst = NULL, tmp, prev;
     virConfType type = VIR_CONF_NONE;
     char *str = NULL;
-    long  l = 0;
+    long long l = 0;
 
     SKIP_BLANKS;
     if (ctxt->cur >= ctxt->end) {