浏览代码

selftests/timers: make loop consistent with array size

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>
Benjamin Gaignard 8 年之前
父节点
当前提交
8f14e26b63
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/testing/selftests/timers/clocksource-switch.c

+ 1 - 1
tools/testing/selftests/timers/clocksource-switch.c

@@ -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;