From 020a496aaf5d78fa2876fe409046fb4753fbfbd6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 21 Sep 2021 21:33:21 +0200 Subject: Do not hardcode STDIN_FILENO == 0 --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 1497be2..93f02ad 100644 --- a/src/main.c +++ b/src/main.c @@ -210,7 +210,7 @@ int feh_main_iteration(int block) in that */ feh_handle_timer(); } - else if ((count > 0) && (FD_ISSET(0, &fdset))) + else if ((count > 0) && (FD_ISSET(STDIN_FILENO, &fdset))) feh_event_handle_stdin(); #ifdef HAVE_INOTIFY else if ((count > 0) && (FD_ISSET(opt.inotify_fd, &fdset))) @@ -227,7 +227,7 @@ int feh_main_iteration(int block) && ((errno == ENOMEM) || (errno == EINVAL) || (errno == EBADF))) eprintf("Connection to X display lost"); - else if ((count > 0) && (FD_ISSET(0, &fdset))) + else if ((count > 0) && (FD_ISSET(STDIN_FILENO, &fdset))) feh_event_handle_stdin(); #ifdef HAVE_INOTIFY else if ((count > 0) && (FD_ISSET(opt.inotify_fd, &fdset))) -- cgit v1.2.3