提交 c3cb8356 编写于 作者: C Christophe JAILLET 提交者: Shuah Khan

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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: NJohn Stultz <john.stultz@linaro.org>
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
上级 0ad46bec
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册