diff options
author | Sven Eckelmann <sven@narfation.org> | 2016-09-21 09:23:50 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-10-19 08:37:54 +0200 |
commit | 4c7da0f6dbcde2431d773ce03cde5e7abede54e0 (patch) | |
tree | 74cca95977875552284b882a393ef10fc5d94115 /net/batman-adv/main.h | |
parent | 507b37cf71c86b7ceaebf333b8ae488a600f5afd (diff) | |
download | op-kernel-dev-4c7da0f6dbcde2431d773ce03cde5e7abede54e0.zip op-kernel-dev-4c7da0f6dbcde2431d773ce03cde5e7abede54e0.tar.gz |
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/main.h')
-rw-r--r-- | net/batman-adv/main.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 6a2328d..daddca9 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -199,8 +199,8 @@ struct packet_type; struct seq_file; struct sk_buff; -#define BATADV_PRINT_VID(vid) ((vid & BATADV_VLAN_HAS_TAG) ? \ - (int)(vid & VLAN_VID_MASK) : -1) +#define BATADV_PRINT_VID(vid) (((vid) & BATADV_VLAN_HAS_TAG) ? \ + (int)((vid) & VLAN_VID_MASK) : -1) extern struct list_head batadv_hardif_list; |