The reason behind this is a fake "defensive programming" strategy as he protected himself againstif(CONSTANT == var) {
// something
} else {
// something else
}
which is does not do a comparison, it does an assignment which sometimes fails (when CONSTANT=0).if(var = CONSTANT) { ... }
This is just bad coding. First, it's an eye-sore, second this programmer is not aware that new GCC iterations warn about this when using -Wall and even halt compilation when used in conjunction with -Werror
The fact that he was very stubborn did not help either.
-ulianov