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>
This commit is contained in:
Родитель
0ad46becb5
Коммит
c3cb83560d
|
@ -122,7 +122,7 @@ static int check_itimer(int which)
|
||||||
else if (which == ITIMER_REAL)
|
else if (which == ITIMER_REAL)
|
||||||
idle_loop();
|
idle_loop();
|
||||||
|
|
||||||
gettimeofday(&end, NULL);
|
err = gettimeofday(&end, NULL);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
perror("Can't call gettimeofday()\n");
|
perror("Can't call gettimeofday()\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -175,7 +175,7 @@ static int check_timer_create(int which)
|
||||||
|
|
||||||
user_loop();
|
user_loop();
|
||||||
|
|
||||||
gettimeofday(&end, NULL);
|
err = gettimeofday(&end, NULL);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
perror("Can't call gettimeofday()\n");
|
perror("Can't call gettimeofday()\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче