if (a=b) {code;}
' is
syntactically valid and sometimes even correct. It puts the value
of `b
' into `a
' and then executes `code' if
`a
' is non-zero. What the programmer probably meant was
`if (a==b) {code;}
', which executes `code' if
`a
' and `b
' are equal.