Eggheads: eggdrop1.6.21/src/botnet.c:1430: possible bad if test ?

David Binderman dcb314 at hotmail.com
Tue Jan 14 13:36:48 CST 2014


Hello there,

I just ran the static analyser "cppcheck" over the source
code of eggdrop1.6.21

It said many things, including

[botnet.c:1430]: (warning) Logical disjunction always evaluates to true: EXPR>= 251 || EXPR <= 254.

Source code is

       if ((*(p + 1)>= 251) || (*(p + 1) <= 254)) {

Maybe

       if ((*(p + 1)>= 251) && (*(p + 1) <= 254)) {

might be better code.

Regards

David Binderman 		 	   		  


More information about the Eggheads mailing list