Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Add missing parentheses for IFQ_CLASSIFY macro's arg...



details:   https://anonhg.NetBSD.org/src/rev/47eb8219f34e
branches:  trunk
changeset: 451212:47eb8219f34e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri May 10 06:45:19 2019 +0000

description:
Add missing parentheses for IFQ_CLASSIFY macro's argument.

diffstat:

 sys/net/if.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r 1c6e15ffec64 -r 47eb8219f34e sys/net/if.h
--- a/sys/net/if.h      Fri May 10 06:33:14 2019 +0000
+++ b/sys/net/if.h      Fri May 10 06:45:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.270 2019/05/10 05:16:34 msaitoh Exp $ */
+/*     $NetBSD: if.h,v 1.271 2019/05/10 06:45:19 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -996,14 +996,14 @@
 
 #define        IFQ_CLASSIFY(ifq, m, af)                                        \
 do {                                                                   \
-       KASSERT((m->m_flags & M_PKTHDR) != 0);                          \
+       KASSERT(((m)->m_flags & M_PKTHDR) != 0);                        \
        mutex_enter((ifq)->ifq_lock);                                   \
        if (ALTQ_IS_ENABLED((ifq))) {                                   \
                if (ALTQ_NEEDS_CLASSIFY((ifq)))                         \
-                       m->m_pkthdr.pattr_class = (*(ifq)->altq_classify) \
+                       (m)->m_pkthdr.pattr_class = (*(ifq)->altq_classify)   \
                                ((ifq)->altq_clfier, (m), (af));        \
-               m->m_pkthdr.pattr_af = (af);                            \
-               m->m_pkthdr.pattr_hdr = mtod((m), void *);              \
+               (m)->m_pkthdr.pattr_af = (af);                          \
+               (m)->m_pkthdr.pattr_hdr = mtod((m), void *);            \
        }                                                               \
        mutex_exit((ifq)->ifq_lock);                                    \
 } while (/*CONSTCOND*/ 0)



Home | Main Index | Thread Index | Old Index