diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-03-14 14:30:08 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-14 14:31:26 -0400 |
commit | a0f892f19094efd963564cf788be887f694be796 (patch) | |
tree | 95107c501355fc10b9651c521ca2258af35a5028 /src/or | |
parent | ddb1889eb8bc128ec0fca35f15b1bf90d2b629ac (diff) | |
download | tor-a0f892f19094efd963564cf788be887f694be796.tar.gz tor-a0f892f19094efd963564cf788be887f694be796.zip |
Simplify the loop.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 */ |