]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/conf.c: fix bug on negative values in virConfParseLong()
authorDaniel Veillard <veillard@redhat.com>
Fri, 19 Oct 2007 10:01:01 +0000 (10:01 +0000)
committerDaniel Veillard <veillard@redhat.com>
Fri, 19 Oct 2007 10:01:01 +0000 (10:01 +0000)
  raised by Tatsuro Enokura
Daniel

ChangeLog
src/conf.c

index 81e5a6bf4b21eec9fd6c380dc82a809ad1a09683..5c52e6f7f0018dd0e9853f37d78f921eb2d67950 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Oct 19 11:59:39 CEST 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/conf.c: fix bug on negative values in virConfParseLong()
+         raised by Tatsuro Enokura
+
 Fri Oct 19 10:24:52 CEST 2007 Daniel Veillard <veillard@redhat.com>
 
        * src/conf.c: documentation cleanups from Jim Meyering
index 3a637b2c59ea659ade5f4ed9f5788fd72410a854..635792c68954b4e13be221a670472b8084f2f025 100644 (file)
@@ -345,6 +345,8 @@ virConfParseLong(virConfParserCtxtPtr ctxt, long *val)
         l = l * 10 + (CUR - '0');
        NEXT;
     }
+    if (neg)
+        l = -l;
     *val = l;
     return(0);
 }