From 669ab14022b2360f8f79b45ea00fed51d6303384 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Thu, 19 Mar 2009 01:27:34 +0100 Subject: [PATCH] Minor cleanups and stack reduction. Signed-off-by: Jan Vidar Krey --- src/netevent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/netevent.c b/src/netevent.c index 4f49340..d0f2b83 100644 --- a/src/netevent.c +++ b/src/netevent.c @@ -242,11 +242,10 @@ void net_on_accept(int server_fd, short ev, void *arg) { struct hub_info* hub = (struct hub_info*) arg; struct user* user = 0; - int accept_more = 1; const char* addr; struct timeval timeout = { TIMEOUT_CONNECTED, 0 }; - while (accept_more) + for (;;) { int fd = net_accept(server_fd); if (fd == -1) @@ -294,7 +293,6 @@ void net_on_accept(int server_fd, short ev, void *arg) event_base_set(hub->evbase, user->ev_read); event_base_set(hub->evbase, user->ev_write); event_add(user->ev_read, &timeout); - } }