[Bug 229552] src/sys/net/if_me.c:522]: (style) Suspicious condition

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jul 5 20:36:41 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229552

            Bug ID: 229552
           Summary: src/sys/net/if_me.c:522]: (style) Suspicious condition
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: dcb314 at hotmail.com

src/sys/net/if_me.c:522]: (style) Suspicious condition (assignment +
comparison); Clarify expression with parentheses.

Source code is

       if (sc == NULL || !ME_READY(sc) ||
            (ifp->if_flags & IFF_MONITOR) != 0 ||
            (ifp->if_flags & IFF_UP) == 0 ||
            (error = me_check_nesting(ifp, m) != 0)) {

maybe better code

       if (sc == NULL || !ME_READY(sc) ||
            (ifp->if_flags & IFF_MONITOR) != 0 ||
            (ifp->if_flags & IFF_UP) == 0 ||
            (error = me_check_nesting(ifp, m)) != 0) {

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list