From 6a26edd153e1c33ea4985a7fa06a611d4113f69c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 23 Feb 2021 14:46:09 +0000 Subject: [PATCH] main: Ensure that epollfd is always initialized Signed-off-by: Michael Tremer --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index db41642..c418143 100644 --- a/src/main.c +++ b/src/main.c @@ -258,6 +258,7 @@ int main(int argc, char* argv[]) { }; struct fireperf_stats stats = { 0 }; int r; + int epollfd = -1; int timerfd = -1; // Parse command line @@ -284,7 +285,7 @@ int main(int argc, char* argv[]) { } // Initialize epoll() - int epollfd = epoll_create1(0); + epollfd = epoll_create1(0); if (epollfd < 0) { ERROR(&conf, "Could not initialize epoll(): %s\n", strerror(errno)); r = 1; -- 2.47.2