]> xenbits.xensource.com Git - libvirt.git/commitdiff
Change s/i/iv/ in test code to avoid syntax-check
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 19 Jul 2013 12:07:41 +0000 (13:07 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 19 Jul 2013 12:08:30 +0000 (13:08 +0100)
The code parsing VIR_TEST_RANGE mistakenly used 'unsigned int i'
which violated syntax-check rules

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tests/testutils.c

index 89bab2a59ea5201f975939eeaf179a0e70d42e6a..72aa5b3ae291ef43784e0e8bb803d1d92f62fb4e 100644 (file)
@@ -632,23 +632,23 @@ int virtTestMain(int argc,
 
     if ((testRange = getenv("VIR_TEST_RANGE")) != NULL) {
         char *end = NULL;
-        unsigned int i;
-        if (virStrToLong_ui(testRange, &end, 10, &i) < 0) {
+        unsigned int iv;
+        if (virStrToLong_ui(testRange, &end, 10, &iv) < 0) {
             fprintf(stderr, "Cannot parse range %s\n", testRange);
             return EXIT_FAILURE;
         }
-        testStart = testEnd = i;
+        testStart = testEnd = iv;
         if (end && *end) {
             if (*end != '-') {
                 fprintf(stderr, "Cannot parse range %s\n", testRange);
                 return EXIT_FAILURE;
             }
             end++;
-            if (virStrToLong_ui(end, NULL, 10, &i) < 0) {
+            if (virStrToLong_ui(end, NULL, 10, &iv) < 0) {
                 fprintf(stderr, "Cannot parse range %s\n", testRange);
                 return EXIT_FAILURE;
             }
-            testEnd = i;
+            testEnd = iv;
 
             if (testEnd < testStart) {
                 fprintf(stderr, "Test range end %zu must be >= %zu\n", testEnd, testStart);