Actually I'm fairly certain it's not a bug but the way C is designed.
When you do an assignment ie i = foo() that assignment returns the value
of foo(). This way you can do x = y = i = foo(). That is a 100% legal
statement in C. Using if(i=foo()) is legal because of this. The
expression i=foo() returns the value of foo() whatever that might be.
In the case of your test program it will be 0 and the if statement will
evaluate to false and you won't see the message. It's not a bug though.
-matt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/