summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/main.c9
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 */