Nmap Development mailing list archives

nmap-6.40/osscan2.cc: 2 * bad assert statement ?


From: David Binderman <dcb314 () hotmail com>
Date: Thu, 2 Jan 2014 08:40:17 +0000

Hello there,

I just ran the static analysis checker "cppcheck" over 
the source code of nmap-6.40. It said many things, including

1.

[osscan2.cc:2651]: (warning) Logical disjunction always evaluates to true: replyNo>= 0 || replyNo < 6.

Source code is

  assert(replyNo>= 0 || replyNo < 6);

Maybe

  assert(replyNo>= 0 && replyNo < 6);

would be better code. 

2.

[osscan2.cc:2696]: (warning) Logical disjunction always evaluates to true: replyNo>= 0 || replyNo < 6.

Duplicate.

Regards

David Binderman                                           
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: