From 2e590963901b1387ef312bd8fd8ef6632e9832ce Mon Sep 17 00:00:00 2001 From: Christian Mehlis Date: Sat, 26 Oct 2013 11:46:29 +0200 Subject: [PATCH] fix wrong error handling introduced in 945aef --- cpu/native/rtc/posix-rtc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpu/native/rtc/posix-rtc.c b/cpu/native/rtc/posix-rtc.c index b08f526fb8..f917d41018 100644 --- a/cpu/native/rtc/posix-rtc.c +++ b/cpu/native/rtc/posix-rtc.c @@ -73,12 +73,10 @@ time_t rtc_time(struct timeval *time) { if (native_rtc_enabled == 1) { _native_in_syscall++; - if (gettimeofday(time, 0) == 0) { - errx(1, "rtc_time: gettimeofday: error"); + if (gettimeofday(time, NULL) == -1) { + err(1, "rtc_time: gettimeofday"); } _native_in_syscall--; } return time->tv_sec; } - -