From a88c7c654a228b6519e7f19090abaa84421dfd27 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 7 Sep 2022 17:19:47 -0600 Subject: [PATCH] Use perror instead of our own crapily-implemented version. Yay standards. --- capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capture.c b/capture.c index 4b4d49e..692191a 100644 --- a/capture.c +++ b/capture.c @@ -183,7 +183,7 @@ int stream_events(char* mouse_path, char* keyboard_path, int hotkey_scancode) { for(int i = 0; i < event_count; i++) { int result = read(events[i].data.fd, &i_event, sizeof(struct input_event)); if(result < 0) { - fprintf(stderr, "Failed to read an event: %d", errno); + perror("Failed to read an event"); return 1; }