aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/packet.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-09-21 09:23:50 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-10-19 08:37:54 +0200
commit4c7da0f6dbcde2431d773ce03cde5e7abede54e0 (patch)
tree74cca95977875552284b882a393ef10fc5d94115 /net/batman-adv/packet.h
parentbatman-adv: Use octal permissions instead of macros (diff)
downloadlinux-dev-4c7da0f6dbcde2431d773ce03cde5e7abede54e0.tar.xz
linux-dev-4c7da0f6dbcde2431d773ce03cde5e7abede54e0.zip
batman-adv: Avoid precedence issues in macros
It must be avoided that arguments to a macro are evaluated ungrouped (which enforces normal operator precendence). Otherwise the result of the macro is not well defined. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/packet.h')
-rw-r--r--net/batman-adv/packet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h
index d2e9bbd5f46d..7a36bcfa0ba0 100644
--- a/net/batman-adv/packet.h
+++ b/net/batman-adv/packet.h
@@ -21,7 +21,7 @@
#include <asm/byteorder.h>
#include <linux/types.h>
-#define batadv_tp_is_error(n) ((u8)n > 127 ? 1 : 0)
+#define batadv_tp_is_error(n) ((u8)(n) > 127 ? 1 : 0)
/**
* enum batadv_packettype - types for batman-adv encapsulated packets