To view parent comment, click here.
To read all comments associated with this story, please click here.
Normally, but here a function and a variable had the same name "foo". So:
if (foo=0){do something}
should have been:
if (foo()=0){do something}
But that is missing both the opening and the closing parenthesis. The article said, "This was caused by something as seemingly harmless as a missing closing parenthesis."
Even without the variable, I think foo would be a function pointer which would be non-zero, and therefore foo==0 would always be false. Remember that X is written in C, so lots of things that higher-level languages would catch might slip through.
At first I thought they meant a single ) parenthesis was missing, but it would had to have been a pair or the compiler would have complained.
Edited 2006-05-03 23:26






Member since:
2005-07-29
Normally, but here a function and a variable had the same name "foo". So:
if (foo=0){do something}
should have been:
if (foo()=0){do something}