Actions
Bug #3078
closedsys/netinet6/nd6_nbr.c: 2 * redundant condition ?
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) */
Updated by swildner about 7 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