From 5338eba39a195e1a76e2d2d3c1c5039fd007e401 Mon Sep 17 00:00:00 2001 From: kamp Date: Thu, 6 Jul 2023 01:01:06 +0200 Subject: [PATCH] LibCore: Remove some dead code in wait_for_events Since max_fd_added and max_fd are initialized to -1 and 0 respectively the former could never be greater than the latter. --- Userland/Libraries/LibCore/EventLoopImplementationUnix.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Userland/Libraries/LibCore/EventLoopImplementationUnix.cpp b/Userland/Libraries/LibCore/EventLoopImplementationUnix.cpp index 08e6db5690..c5888306da 100644 --- a/Userland/Libraries/LibCore/EventLoopImplementationUnix.cpp +++ b/Userland/Libraries/LibCore/EventLoopImplementationUnix.cpp @@ -153,10 +153,8 @@ retry: max_fd = fd; }; - int max_fd_added = -1; // The wake pipe informs us of POSIX signals as well as manual calls to wake() add_fd_to_set(thread_data.wake_pipe_fds[0], read_fds); - max_fd = max(max_fd, max_fd_added); for (auto& notifier : thread_data.notifiers) { if (notifier->type() == Notifier::Type::Read)