diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-08-09 13:11:26 +0300 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2016-09-20 18:00:28 +0300 |
commit | c3cb83560daae4c619d1034eb98c1a40ee896387 (patch) | |
tree | 8f8d89603ffbd343793fc52a21af889c43541a68 /tools | |
parent | 0ad46becb5c03e7d2464f00b2a1cd460a9c2b3c0 (diff) | |
download | linux-c3cb83560daae4c619d1034eb98c1a40ee896387.tar.xz |
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 <christophe.jaillet@wanadoo.fr>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/timers/posix_timers.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |