Use perror instead of our own crapily-implemented version.

Yay standards.
This commit is contained in:
Eli Ribble 2022-09-07 17:19:47 -06:00
parent 8985f990cb
commit a88c7c654a
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ int stream_events(char* mouse_path, char* keyboard_path, int hotkey_scancode) {
for(int i = 0; i < event_count; i++) { for(int i = 0; i < event_count; i++) {
int result = read(events[i].data.fd, &i_event, sizeof(struct input_event)); int result = read(events[i].data.fd, &i_event, sizeof(struct input_event));
if(result < 0) { if(result < 0) {
fprintf(stderr, "Failed to read an event: %d", errno); perror("Failed to read an event");
return 1; return 1;
} }