Use perror instead of our own crapily-implemented version.
Yay standards.
This commit is contained in:
parent
8985f990cb
commit
a88c7c654a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue