diff --git a/vl.c b/vl.c index 06031715ac..6e34fb348d 100644 --- a/vl.c +++ b/vl.c @@ -1841,7 +1841,7 @@ static void main_loop(void) #ifdef CONFIG_PROFILER int64_t ti; #endif - do { + while (!main_loop_should_exit()) { #ifdef CONFIG_PROFILER ti = profile_getclock(); #endif @@ -1849,7 +1849,7 @@ static void main_loop(void) #ifdef CONFIG_PROFILER dev_time += profile_getclock() - ti; #endif - } while (!main_loop_should_exit()); + } } static void version(void)