[tor-commits] [tor/master] Simplify the loop.
nickm at torproject.org
nickm at torproject.org
Wed Mar 18 12:58:25 UTC 2015
commit a0f892f19094efd963564cf788be887f694be796
Author: Nick Mathewson <nickm at torproject.org>
Date: Sat Mar 14 14:30:08 2015 -0400
Simplify the loop.
---
src/or/main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/or/main.c b/src/or/main.c
index dd21b1a..d0fe8cb 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 */
More information about the tor-commits
mailing list