From: Nick Mathewson Date: Sat, 14 Mar 2015 18:30:08 +0000 (-0400) Subject: Simplify the loop. X-Git-Tag: tor-0.2.6.5-rc~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0f892f19094efd963564cf788be887f694be796;p=thirdparty%2Ftor.git Simplify the loop. --- diff --git a/src/or/main.c b/src/or/main.c index dd21b1a8f0..d0fe8cbc00 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2151,10 +2151,11 @@ run_main_loop_once(void) static int run_main_loop_until_done(void) { - int loop_result = 1; - while ((loop_result = run_main_loop_once()) == 1) - continue; - return loop_result; + int loop_result = 1; + do { + loop_result = run_main_loop_once(); + } while (loop_result == 1); + return loop_result; } #ifndef _WIN32 /* Only called when we're willing to use signals */