qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [Patch] Simplify cpu_can_run()


From: Jun Koi
Subject: [Qemu-devel] [Patch] Simplify cpu_can_run()
Date: Mon, 12 Apr 2010 15:24:57 +0900

This patch simplifies cpu_can_run().

Signed-off-by: Jun Koi <address@hidden>


diff --git a/cpus.c b/cpus.c
index 0debe77..4adb66d 100644
--- a/cpus.c
+++ b/cpus.c
@@ -98,9 +98,7 @@ static void do_vm_stop(int reason)

 static int cpu_can_run(CPUState *env)
 {
-    if (env->stop)
-        return 0;
-    if (env->stopped || !vm_running)
+    if (env->stop || env->stopped || !vm_running)
         return 0;
     return 1;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]