mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
Assert read return value in examples/input-method
This commit is contained in:
parent
4c28745c95
commit
b99da405e7
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -390,7 +391,8 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
} else if (caught.data.fd == timer_fd) {
|
||||
uint64_t expirations;
|
||||
read(timer_fd, &expirations, sizeof(expirations));
|
||||
ssize_t n = read(timer_fd, &expirations, sizeof(expirations));
|
||||
assert(n >= 0);
|
||||
handle_timer();
|
||||
} else {
|
||||
printf("Unknown source\n");
|
||||
|
|
Loading…
Reference in a new issue