[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.2.6] Simplify the loop.
commit a0f892f19094efd963564cf788be887f694be796
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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 */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits