git: a2070ebfaf04 - stable/14 - bridge: define VLANTAGOF correctly

From: Lexi Winter <ivy_at_FreeBSD.org>
Date: Wed, 07 May 2025 19:15:11 UTC
The branch stable/14 has been updated by ivy:

URL: https://cgit.FreeBSD.org/src/commit/?id=a2070ebfaf0461ec57f78abe2704dc014a74e552

commit a2070ebfaf0461ec57f78abe2704dc014a74e552
Author:     Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-04-04 15:05:01 +0000
Commit:     Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-05-07 19:07:51 +0000

    bridge: define VLANTAGOF correctly
    
    to avoid strange precedence errors, enclose the macro body in
    parentheses.  this fixes constructs like: if (VLANTAGOF(m) == i)
    
    Reviewed by:    kp
    
    (cherry picked from commit f36292f010fcc6391605182f2973fdc12a3bd15f)
---
 sys/net/if_bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 5cb4a033e325..79561bc4c9cd 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -419,7 +419,7 @@ static void	bridge_linkcheck(struct bridge_softc *sc);
  * to indicate untagged frames.
  */
 #define	VLANTAGOF(_m)	\
-    (_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : DOT1Q_VID_NULL
+    ((_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : DOT1Q_VID_NULL)
 
 static struct bstp_cb_ops bridge_ops = {
 	.bcb_state = bridge_state_change,