[libvirt PATCH 2/2] tests: bhyve: use bitwise shift when defining flags

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

 



Although I'm sure we all know the powers of two by heart now,
this is the prevalent style for flag defition.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 tests/bhyveargv2xmltest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
index e86c9e3b10..2ccc1379b9 100644
--- a/tests/bhyveargv2xmltest.c
+++ b/tests/bhyveargv2xmltest.c
@@ -17,9 +17,9 @@
 static bhyveConn driver;
 
 typedef enum {
-    FLAG_EXPECT_FAILURE     = 1,
-    FLAG_EXPECT_PARSE_ERROR = 2,
-    FLAG_EXPECT_WARNING     = 4,
+    FLAG_EXPECT_FAILURE     = 1 << 0,
+    FLAG_EXPECT_PARSE_ERROR = 1 << 1,
+    FLAG_EXPECT_WARNING     = 1 << 2,
 } virBhyveArgv2XMLTestFlags;
 
 static int
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux