diff options
author | emersion <contact@emersion.fr> | 2018-10-01 22:46:22 +0200 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-10-04 21:58:17 +0200 |
commit | abddfc99f2a0fb4f61292e3ac1c0b142effa28c2 (patch) | |
tree | 58cee260a9be64ad3b2b94712098e941980adaac | |
parent | 54e1287f307d13566deaf51683da373f3524d1d9 (diff) |
output: fix clock_gettime return value handling
-rw-r--r-- | types/wlr_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/types/wlr_output.c b/types/wlr_output.c index 1baa5027..6ff06fd6 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -566,7 +566,8 @@ void wlr_output_send_present(struct wlr_output *output, struct timespec *when, struct timespec now; if (when == NULL) { clockid_t clock = wlr_backend_get_present_clock(output->backend); - if (!clock_gettime(clock, &now)) { + errno = 0; + if (clock_gettime(clock, &now) != 0) { wlr_log_errno(WLR_ERROR, "failed to send output present event: " "failed to read clock"); return; |