proposed change to style(9): require yoda style if statements

Alexander Churanov alexanderchuranov at gmail.com
Thu May 13 10:26:43 UTC 2010


2010/5/11 Eitan Adler <lists at eitanadler.com>:
> My proposal is simple:
> require that any if statement that compares a constant to a mutable variable
> be written as
> if (constant == variable)
> instead of
> if (variable == constant)

Use "const" qualification. It's portable and does not require
rewriting conditionals in any way.

Alexander Churanov


More information about the freebsd-hackers mailing list