Skip to contentSkip to conversation

libxl: fix xcflags assignment in libxl__domain_suspend

PATCH In review Olaf Hering 2 participants 2 messages Jan 31, 2013 – Feb 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: fix xcflags assignment in libxl__domain_suspend

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1359645080 -3600
# Node ID 91fe6b42c7d4010ada78617d18133137d7194d9b # Parent 6727070b4129cf852199b66b6a81042ee6966a98
libxl: fix xcflags assignment in libxl__domain_suspend

Currently ->xcflags remains 1 because the braces are placed incorrectly. Put each logical unit into its own braces to fix assigment to xcflags.

tools/libxl/libxl_dom.c +3 -3
diff -r 6727070b4129 -r 91fe6b42c7d4 tools/libxl/libxl_dom.c
@@ -1238,9 +1238,9 @@ void libxl__domain_suspend(libxl__egc *e
         abort();
     }
 
-    dss->xcflags = (live) ? XCFLAGS_LIVE : 0
-          | (debug) ? XCFLAGS_DEBUG : 0
-          | (dss->hvm) ? XCFLAGS_HVM : 0;
+    dss->xcflags = (live ? XCFLAGS_LIVE : 0)
+          | (debug ? XCFLAGS_DEBUG : 0)
+          | (dss->hvm ? XCFLAGS_HVM : 0);
 
     dss->suspend_eventchn = -1;
     dss->guest_responded = 0;
#1 lore raw
Quoted 11 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1359645080 -3600
# Node ID 91fe6b42c7d4010ada78617d18133137d7194d9b # Parent 6727070b4129cf852199b66b6a81042ee6966a98
libxl: fix xcflags assignment in libxl__domain_suspend

Currently ->xcflags remains 1 because the braces are placed incorrectly. Put each logical unit into its own braces to fix assigment to xcflags.

Acked + applied , thanks.

Quoted 22 lines

diff -r 6727070b4129 -r 91fe6b42c7d4 tools/libxl/libxl_dom.c

tools/libxl/libxl_dom.c +3 -3
@@ -1238,9 +1238,9 @@ void libxl__domain_suspend(libxl__egc *e
         abort();
     }
 
-    dss->xcflags = (live) ? XCFLAGS_LIVE : 0
-          | (debug) ? XCFLAGS_DEBUG : 0
-          | (dss->hvm) ? XCFLAGS_HVM : 0;
+    dss->xcflags = (live ? XCFLAGS_LIVE : 0)
+          | (debug ? XCFLAGS_DEBUG : 0)
+          | (dss->hvm ? XCFLAGS_HVM : 0);
 
     dss->suspend_eventchn = -1;
     dss->guest_responded = 0;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel