selftests/timers: make loop consistent with array size
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Wed, 23 Aug 2017 16:07:05 +0000 (18:07 +0200)
committerShuah Khan <shuahkh@osg.samsung.com>
Fri, 25 Aug 2017 16:00:51 +0000 (10:00 -0600)
clocksource_list array is defined as char [10][30] so
to initialise it we only have to iterate 10 times.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/timers/clocksource-switch.c

index 3ef2146..bfc974b 100644 (file)
@@ -50,7 +50,7 @@ int get_clocksources(char list[][30])
 
        close(fd);
 
-       for (i = 0; i < 30; i++)
+       for (i = 0; i < 10; i++)
                list[i][0] = '\0';
 
        head = buf;