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

[PATCH 3/3] Avoid unnecessary assertion.



Add the missing brackets to an if statement so that FdoS4ToS3() is not
always called in __FdoSetSystemPowerUp().

Signed-off-by: Troy Crosley <troycrosley@xxxxxxxxx>
---
 src/xeniface/fdo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/xeniface/fdo.c b/src/xeniface/fdo.c
index 1f859cd..6aabf96 100644
--- a/src/xeniface/fdo.c
+++ b/src/xeniface/fdo.c
@@ -1740,9 +1740,10 @@ __FdoSetSystemPowerUp(
         goto done;
 
     if (SystemState < PowerSystemHibernate &&
-        __FdoGetSystemPowerState(Fdo) >= PowerSystemHibernate)
+        __FdoGetSystemPowerState(Fdo) >= PowerSystemHibernate) {
         __FdoSetSystemPowerState(Fdo, PowerSystemHibernate);
         FdoS4ToS3(Fdo);
+    }
 
     Info("%s -> %s\n",
          PowerSystemStateName(__FdoGetSystemPowerState(Fdo)),
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.