:having said that, :In this case the braces in question in ithread_schedule are: :- } else :+ } else { : curthread->td_kse->ke_flags |= KEF_NEEDRESCHED; :+ } : :I tend to always put braces on the else clause if the 'then' clause :has braces.. it just helps me find the end of the if statement. :The "if" statement in question was rewritten as part of KSE :so Adding the braces on the else clause doesn't seem 'out of scope' :to me.. It's not a tremendous obfuscation, because the clause :in question needs to be considered to understand the change..
I do this too. My rule for if() statements 'if (exp) stmt1 else stmt2' in the FreeBSD codebase is: * If <stmt1> or <stmt2> is multi-line, or <exp> is multi-line, then braces are used around both statements, period. Multi-line means: multiple lines inclusive of any comments, not just the pure C part of it. This is wrong: if (fubar) /* * yada yada */ stmt; else { stmt; stmt; } if (fubar) stmt; else { stmt; stmt; } This is right: if (fubar) { /* * yada yada */ stmt; } else { stmt; stmt; } if (fubar) { stmt; } else { stmt; stmt; } Same goes with for(), while(), etc. -Matt Matthew Dillon <[EMAIL PROTECTED]> To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message