git: de4bfd6b9987 - main - udp_var: correct intoudpcb macro unintended identifier dependency
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Jun 2024 15:29:24 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=de4bfd6b9987987f82485e582beaa26338ed01d2 commit de4bfd6b9987987f82485e582beaa26338ed01d2 Author: Reid Linnemann <rlinnemann@netgate.com> AuthorDate: 2024-05-07 22:46:35 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2024-06-14 15:28:28 +0000 udp_var: correct intoudpcb macro unintended identifier dependency Change 483fe9651 embedded struct inpcb into struct udpcb and updated the intoudpcb macro to use __containerof to locate it. This change accidentally introduced a dependency on the identifier inp being defined in the block the macro is expanded in. This should have been the macro argument ip. This change makes this simple correction. No functional change intended. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/udp_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index 0d70bad91df4..2528e4fcb30f 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -120,7 +120,7 @@ struct udpcb { void *u_tun_ctx; /* Tunneling callback context. */ }; -#define intoudpcb(ip) __containerof((inp), struct udpcb, u_inpcb) +#define intoudpcb(ip) __containerof((ip), struct udpcb, u_inpcb) #define sotoudpcb(so) (intoudpcb(sotoinpcb(so))) VNET_PCPUSTAT_DECLARE(struct udpstat, udpstat);