From 18db423b1d36b96d30e06dd4b3e8142edcabfda6 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 31 Mar 2016 11:08:59 -0700 Subject: [PATCH] oops - just use 'sd' for the loop. --- src/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 76c524e..4f43f3c 100755 --- a/src/core.c +++ b/src/core.c @@ -1493,7 +1493,7 @@ check_conn(int sd, int is_readable, int is_writable) void core_loop(void) { - int is_readable, is_writable, n, sd, i = 0; + int is_readable, is_writable, n, sd; fd_set readable, writable; fd_mask mask; @@ -1519,7 +1519,7 @@ core_loop(void) /* XXX totally suboptimal loop, but less potentially problematic */ - for (i = 0; i <= max_sd; i++) { + for (sd = 0; sd <= max_sd; sd++) { is_readable = (FD_ISSET(sd, &readable) && FD_ISSET(sd, &rdfds)); is_writable = (FD_ISSET(sd, &writable) && FD_ISSET(sd, &wrfds)); if (is_readable || is_writable)