[PATCH 1/3] net: Add parens to macro PSEUDO_HDR_SIZE
Andrew Goodbody
andrew.goodbody at linaro.org
Tue Jul 8 18:51:16 CEST 2025
Smatch reports a warning about possibly needing parens around the macro
PSEUDO_HDR_SIZE. This will not affect the one place the macro is used
but add the parens anyway as it is good practice to have them and if the
macro is used again in the future it could possibly matter then.
Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
include/net/tcp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 5022fa9dc1b..6f4d58a1234 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -235,7 +235,7 @@ struct pseudo_hdr {
u16 len;
} __packed;
-#define PSEUDO_HDR_SIZE (sizeof(struct pseudo_hdr)) - PSEUDO_PAD_SIZE
+#define PSEUDO_HDR_SIZE ((sizeof(struct pseudo_hdr)) - PSEUDO_PAD_SIZE)
/**
* union tcp_build_pkt - union for building TCP/IP packet.
--
2.39.5
More information about the U-Boot
mailing list