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>
This commit is contained in:

committed by
Simon Wunderlich

parent
507b37cf71
commit
4c7da0f6db
@@ -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
|
||||
|
Reference in New Issue
Block a user