aboutsummaryrefslogtreecommitdiff
path: root/src/helper/align.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/align.h')
-rw-r--r--src/helper/align.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/align.h b/src/helper/align.h
index 935a6a3..d717006 100644
--- a/src/helper/align.h
+++ b/src/helper/align.h
@@ -24,7 +24,7 @@
#define IS_PWR_OF_2(x) \
({ \
typeof(x) _x = (x); \
- _x == 0 || (_x & (_x - 1)) == 0; \
+ _x != 0 && (_x & (_x - 1)) == 0; \
})
#endif /* OPENOCD_HELPER_ALIGN_H */