File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2426,7 +2426,7 @@ static void handle_inotify_events(void) {
24262426 rem_len -= struct_len ;
24272427 assert (rem_len >= 0 );
24282428
2429- if (strncmp (ie -> name , "event" , strlen ("event" )) == 0 ) {
2429+ if (strncmp (ie -> name , "event" , strlen ("event" ) + 1 ) == 0 ) {
24302430 if (ie -> mask & IN_CREATE ) {
24312431 attach_input_device (ie -> name );
24322432 } else {
@@ -2890,7 +2890,11 @@ int main(int argc, char **argv) {
28902890 }
28912891 wl_display_flush_safe (state .display );
28922892
2893- poll (ev_fds , POLL_FD_COUNT , calc_poll_timeout ());
2893+ if (poll (ev_fds , POLL_FD_COUNT , calc_poll_timeout ()) == -1 ) {
2894+ fprintf (stderr , "FATAL ERROR: 'poll' errored out: %s\n" ,
2895+ strerror (errno ));
2896+ exit (1 );
2897+ }
28942898
28952899 if (ev_fds [2 ].revents & POLLIN ) {
28962900 if (wl_display_read_events (state .display ) == -1 ) {
@@ -2921,7 +2925,7 @@ int main(int argc, char **argv) {
29212925 ev_fds [1 ].revents = 0 ;
29222926 }
29232927
2924- wl_display_disconnect ( state . display );
2928+ /* Control never reaches this point. */
29252929 } else {
29262930 while (true) {
29272931 while (true) {
You can’t perform that action at this time.
0 commit comments