summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamyoon Woo <namyoon@chromium.org>2019-06-14 11:11:56 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-15 00:54:12 +0000
commit30eeccc3523285238837321efb4a506b5eb54e0d (patch)
tree6c4829af203b8ab772a20c66a95fbc1276297127
parenta5e4ad34e7301acccba31e1e7a9c94258e7973da (diff)
downloadchrome-ec-30eeccc3523285238837321efb4a506b5eb54e0d.tar.gz
include/util: enclose a arg of POWER_OF_TWO into parentheses
It is something should be done. BUG=None BRANCH=None TEST=make buildall -j Change-Id: I7a96385cf82ff458446744ae92ffc8349a443098 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660942 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r--include/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/util.h b/include/util.h
index edef7d9b38..91054ff660 100644
--- a/include/util.h
+++ b/include/util.h
@@ -53,7 +53,7 @@ extern "C" {
((type *)(((uint8_t *) pointer) - offsetof(type, member)))
/* True of x is a power of two */
-#define POWER_OF_TWO(x) (x && !(x & (x - 1)))
+#define POWER_OF_TWO(x) ((x) && !((x) & ((x) - 1)))
/*
* macros for integer division with various rounding variants