mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-25 11:34:32 +00:00
uev_timer_set(): Check return value of timerfd API
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
7e38c11b87
commit
52d8d7109b
1 file changed
+2
-1
@@ -131,7 +131,8 @@ int uev_timer_set(uev_t *w, int timeout, int period)
|
||||
|
||||
msec2tspec(timeout, &time.it_value);
|
||||
msec2tspec(period, &time.it_interval);
|
||||
timerfd_settime(w->fd, 0, &time, NULL);
|
||||
if (timerfd_settime(w->fd, 0, &time, NULL) < 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return uev_watcher_start(w);
|
||||
|
||||
Reference in new issue
Block a user