Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit a9f9684bb5735389247e79868010f314b488649a Author: Sven Eckelmann sven@narfation.org Date: Wed Sep 21 09:23:50 2016 +0200
batctl: 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
a9f9684bb5735389247e79868010f314b488649a packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packet.h b/packet.h index d2e9bbd..7a36bcf 100644 --- a/packet.h +++ b/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