Repository : ssh://git@diktynna/alfred
On branch : master
commit f9cf9d22c8bdc8c675c5080d9a26a21082aa1d77 Author: Sven Eckelmann sven@narfation.org Date: Sun Feb 20 10:09:22 2022 +0100
alfred: Ensure evaluation order in FIXED_TLV_LEN
If FIXED_LENGTH would contain an actual evaluatable statement like "*object" then the order of evaluation would not be correct in the second part of the formula for FIXED_LENGTH. A simple parenthesis avoids this problem.
Signed-off-by: Sven Eckelmann sven@narfation.org
f9cf9d22c8bdc8c675c5080d9a26a21082aa1d77 alfred.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/alfred.h b/alfred.h index f348c66..2943c4c 100644 --- a/alfred.h +++ b/alfred.h @@ -31,7 +31,7 @@ #define NO_FILTER -1
#define FIXED_TLV_LEN(__tlv_type) \ - htons(sizeof(__tlv_type) - sizeof(__tlv_type.header)) + htons(sizeof(__tlv_type) - sizeof((__tlv_type).header))
enum data_source { SOURCE_LOCAL = 0,