Skip to content

Commit

Permalink
Merge pull request #271 from mehlis/master
Browse files Browse the repository at this point in the history
fix wrong error handling introduced in 945aef
  • Loading branch information
mehlis committed Oct 26, 2013
2 parents 128125b + 2e59096 commit 6ebe1bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cpu/native/rtc/posix-rtc.c
Expand Up @@ -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;
}


0 comments on commit 6ebe1bf

Please sign in to comment.