Project

General

Profile

Actions

Bug #3078

closed

sys/netinet6/nd6_nbr.c: 2 * redundant condition ?

Added by dcb over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
10/11/2017
Due date:
% Done:

0%

Estimated time:

Description

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) */

Related issues 1 (0 open1 closed)

Related to Bug #2560: gitClosed05/14/2013

Actions
Actions #1

Updated by swildner over 6 years ago

  • Status changed from New to Closed

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

Actions #2

Updated by Clan1961 over 5 years ago

Actions

Also available in: Atom PDF