diff mbox series

selftests:timers: globals don't need initialization

Message ID 20220702000834.7724-1-zanaziz313@gmail.com (mailing list archive)
State Accepted
Commit b7ecce6800eb1aa97c486c1aabf64659193d5a4c
Headers show
Series selftests:timers: globals don't need initialization | expand

Commit Message

Zan Aziz July 2, 2022, 12:08 a.m. UTC
Global variables do not need to be initialized to 0 and checkpatch
flags this error in tools/testing/selftests/timers/alarmtimer-suspend.c:

ERROR: do not initialise globals to 0
+int final_ret = 0;

Fix this checkpatch error.

Signed-off-by: Zan Aziz <zanaziz313@gmail.com>
---
 tools/testing/selftests/timers/alarmtimer-suspend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/timers/alarmtimer-suspend.c b/tools/testing/selftests/timers/alarmtimer-suspend.c
index 54da4b088f4c..4332b494103d 100644
--- a/tools/testing/selftests/timers/alarmtimer-suspend.c
+++ b/tools/testing/selftests/timers/alarmtimer-suspend.c
@@ -92,7 +92,7 @@  long long timespec_sub(struct timespec a, struct timespec b)
 	return ret;
 }
 
-int final_ret = 0;
+int final_ret;
 
 void sigalarm(int signo)
 {