]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: Add parens to macro PSEUDO_HDR_SIZE
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Tue, 8 Jul 2025 16:51:16 +0000 (17:51 +0100)
committerJerome Forissier <jerome.forissier@linaro.org>
Fri, 1 Aug 2025 07:30:47 +0000 (09:30 +0200)
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@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
include/net/tcp.h

index 5022fa9dc1b6dd1cf9332ef1724d1eb67e2f9cf5..6f4d58a12343f38d3b59dbc1ba44c38e0d7b6c0b 100644 (file)
@@ -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.