NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/50815: crypto/dist/ipsec-tools/src/racoon/cfparse.y: 2 * redundant test ?
>Number: 50815
>Category: lib
>Synopsis: crypto/dist/ipsec-tools/src/racoon/cfparse.y: 2 * redundant test ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 16 08:45:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160216
>Organization:
>Environment:
>Description:
1.
src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1494]: (style) Same expression on both sides of '||'.
Source code is
if (($5 == IPPROTO_ICMP || $5 == IPPROTO_ICMPV6)
&& ($4 != IPSEC_PORT_ANY || $4 != IPSEC_PORT_ANY)) {
2.
src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:1544]: (style) Same expression on both sides of '||'.
Source code is
if (($6 == IPPROTO_ICMP || $6 == IPPROTO_ICMPV6)
&& ($5 != IPSEC_PORT_ANY || $5 != IPSEC_PORT_ANY)) {
Also, in the same file, is this oddity:
[src/crypto/dist/ipsec-tools/src/racoon/cfparse.y:2741]: (warning) Division by result of sizeof(). memset() expects a size in bytes, did you intend to multiply instead?
Source code is
memset(types, 0, ARRAYLEN(types));
Maybe better code
memset(types, 0, sizeof(types));
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index