]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Simplify the loop.
authorNick Mathewson <nickm@torproject.org>
Sat, 14 Mar 2015 18:30:08 +0000 (14:30 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 14 Mar 2015 18:31:26 +0000 (14:31 -0400)
src/or/main.c

index dd21b1a8f0a3c27b83dfcfd0efee9440560d7e07..d0fe8cbc00e2247de89a396ea9813673dea6ed41 100644 (file)
@@ -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 */