Skip to contentSkip to conversation

tools/testing/selftests: Fix uninitialized variable

PATCH New Felipe Pena 1 participant 1 message Oct 11, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/testing/selftests: Fix uninitialized variable

The err variable is intended to receive the timer_create() return before checking it

---
 tools/testing/selftests/timers/posix_timers.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/timers/posix_timers.c +1 -1
index 4fa655d..41bd855 100644
@@ -151,7 +151,7 @@ static int check_timer_create(int which)
 	fflush(stdout);
 
 	done = 0;
-	timer_create(which, NULL, &id);
+	err = timer_create(which, NULL, &id);
 	if (err < 0) {
 		perror("Can't create timer\n");
 		return -1;
Signature · 1 line
1.7.10.4