mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #271 from mehlis/master
fix wrong error handling introduced in 945aef
This commit is contained in:
commit
6ebe1bfdc7
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user