Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
colanderman
· 13y ago · 0 comments
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.
Comments
[–]
harrytuttle
13y ago
That's the failsafe (one I believe heavily in as well). But getting it right up front is still the best approach.