From 12f2f1e592922262a6bae2bbb7b9520d847872b5 Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 5 Mar 2025 17:16:12 +0000 Subject: [PATCH] Initialize qtv for clarity. Closes #3035 --- ncat/ncat_listen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c index 445cf684e..a241bf9f9 100644 --- a/ncat/ncat_listen.c +++ b/ncat/ncat_listen.c @@ -203,7 +203,7 @@ int ncat_listen() { int rc, i, j, fds_ready; fd_set listen_fds; - struct timeval tv, qtv; + struct timeval tv={0}, qtv={0}; struct timeval *tvp = NULL; unsigned int num_sockets; int proto = o.proto; @@ -324,8 +324,8 @@ int ncat_listen() if (usec_wait >= 0) { tvp = &tv; - tv.tv_sec = 0; - tv.tv_usec = usec_wait; + tv.tv_sec = 0; + tv.tv_usec = usec_wait; } fds_ready = fselect(client_fdlist.fdmax + 1, &readfds, &writefds, NULL, tvp);