From a81eb0b4e903a75cd0777bed2a6886fac105b4fc Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 19 Jul 2013 13:07:41 +0100 Subject: [PATCH] Change s/i/iv/ in test code to avoid syntax-check The code parsing VIR_TEST_RANGE mistakenly used 'unsigned int i' which violated syntax-check rules Signed-off-by: Daniel P. Berrange --- tests/testutils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testutils.c b/tests/testutils.c index 89bab2a59e..72aa5b3ae2 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -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); -- GitLab