From: Christophe JAILLET Date: Tue, 9 Aug 2016 10:11:26 +0000 (+0200) Subject: selftests/timers: Add missing error code assignment before test X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c3cb83560daae4c619d1034eb98c1a40ee896387;p=linux-beck.git selftests/timers: Add missing error code assignment before test In order to work, the 'err' return value has to be updated otherwise the test can never be true. Signed-off-by: Christophe JAILLET Acked-by: John Stultz Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c index 5a246a02dff3..15cf56d32155 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -122,7 +122,7 @@ static int check_itimer(int which) else if (which == ITIMER_REAL) idle_loop(); - gettimeofday(&end, NULL); + err = gettimeofday(&end, NULL); if (err < 0) { perror("Can't call gettimeofday()\n"); return -1; @@ -175,7 +175,7 @@ static int check_timer_create(int which) user_loop(); - gettimeofday(&end, NULL); + err = gettimeofday(&end, NULL); if (err < 0) { perror("Can't call gettimeofday()\n"); return -1;