Browse Source

Simplify the loop.

Nick Mathewson 10 years ago
parent
commit
a0f892f190
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/or/main.c

+ 5 - 4
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 */