hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
153 stars 17 forks source link

cjdns-cjdns-v18/net/UpperDistributor_admin.c: bad code #146

Open dcb314 opened 8 years ago

dcb314 commented 8 years ago

net/UpperDistributor_admin.c:43]: (warning) Logical conjunction always evaluates to false: EXPR < 1 && EXPR > 65536.

Source code is

if (udpPort < 1 && udpPort > 65536) {

Maybe better code

if (udpPort < 1 || udpPort > 65536) {

ansuz commented 8 years ago

Thanks for the report!