ebtables-2.0.10: 2 * bad if statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

I just ran the static analysis checker "cppcheck" over the
source code of ebtables-2.0.10. It said

1.

[extensions/ebt_ip.c:58]: (warning) Logical disjunction always evaluates to true: port>= 0 || port <= 65535.

Source code is

    else if (port>= 0 || port <= 0xFFFF) {
        return port;
    }

Some thing like

    else if (port>= 0 && port <= 0xFFFF) {
        return port;
    }

might be better.

2.

[extensions/ebt_ip6.c:111]: (warning) Logical disjunction always evaluates to true: port>= 0 || port <= 65535.

Duplicate

Regards

David Binderman 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux