From: Michael Tremer Date: Tue, 23 Feb 2021 14:46:09 +0000 (+0000) Subject: main: Ensure that epollfd is always initialized X-Git-Tag: 0.2.0~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=6a26edd153e1c33ea4985a7fa06a611d4113f69c;p=fireperf.git main: Ensure that epollfd is always initialized Signed-off-by: Michael Tremer --- 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;