2 ms·
Or run a linter or static checker which disallows assignments in conditionals as part of your build and/or checkin process. They'll catch this and other fun C
by colanderman 13y ago
Or run a linter or static checker which disallows assignments in conditionals as part of your build and/or checkin process. They'll catch this and other fun C "gotchas" without relying on human vigilance.
- harrytuttle 13y agoThat's the failsafe (one I believe heavily in as well). But getting it right up front is still the best approach.