Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3cb8356 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Shuah Khan
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 0ad46bec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;