[PATCH] ebgenv.h: Use brackets with numerical definitions

2 views
Skip to first unread message

Andreas J. Reichel

unread,
Nov 15, 2017, 10:57:26 AM11/15/17
to efibootg...@googlegroups.com, Andreas Reichel, jan.k...@siemens.com
From: Andreas Reichel <andreas.r...@siemens.com>

Brackets are important for definition of flag bits,
otherwise logical operations like 'not' lead to wrong
results.

Signed-off-by: Andreas Reichel <andreas.r...@siemens.com>
---
include/ebgenv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/ebgenv.h b/include/ebgenv.h
index 1257141..3f03012 100644
--- a/include/ebgenv.h
+++ b/include/ebgenv.h
@@ -28,8 +28,8 @@
#define USERVAR_TYPE_SINT64 9
#define USERVAR_TYPE_STRING_ASCII 32
#define USERVAR_TYPE_BOOL 64
-#define USERVAR_TYPE_GLOBAL 1ULL << 62
-#define USERVAR_TYPE_DELETED 1ULL << 63
+#define USERVAR_TYPE_GLOBAL (1ULL << 62)
+#define USERVAR_TYPE_DELETED (1ULL << 63)
#define USERVAR_TYPE_DEFAULT USERVAR_TYPE_GLOBAL

#define USERVAR_STANDARD_TYPE_MASK ((1ULL << 32) - 1)
--
2.15.0

Reply all
Reply to author
Forward
0 new messages