Issue #3078 has been updated by swildner.

Status changed from New to Closed

I've fixed those and a couple of other "Redundant condition: ... is equivalent 
to ..."  from cppcheck.


----------------------------------------
Bug #3078: sys/netinet6/nd6_nbr.c: 2 * redundant condition ?
http://bugs.dragonflybsd.org/issues/3078#change-13264

* Author: dcb
* Status: Closed
* Priority: Low
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
dragonfly/sys/netinet6/nd6_nbr.c:290]: (style) Redundant condition: 
cmpifp==rtifp. 'cmpifp!=rtifp || (cmpifp==rtifp && (m->m_flags&M_MCAST)==0)' is 
equivalent to 'cmpifp!=rtifp || (m->m_flags&M_MCAST)==0'

Source code is

        if (rt != NULL &&
            (cmpifp != rtifp ||
             (cmpifp == rtifp && (m->m_flags & M_MCAST) == 0))

[dragonfly/sys/netinet6/nd6_nbr.c:787]: (style) Redundant condition: 
!is_override. 'is_override || (!is_override && lladdr&&!llchange)' is 
equivalent to 'is_override || lladdr&&!llchange'

Source code is

        } else if (is_override                 /* (2a) */
            || (!is_override && (lladdr && !llchange)) /* (2b) */
            || !lladdr) {                  /* (2c) */





-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://bugs.dragonflybsd.org/my/account

Reply via email to