uev_timer_set(): Check return value of timerfd API

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-10-30 14:49:49 +01:00
parent 7e38c11b87
commit 52d8d7109b
+2 -1
View File
@@ -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);