HomeFreeBSD

Relax the rule against declaring variables in nested scopes and for

Description

Relax the rule against declaring variables in nested scopes and for
initializations.

Relax some overly perscriptive rules against declarations: they may be at the
start of any blocks, even if things aren't super complicated. Allow more
initializations (those that call simple functions, like accessor functions for
newbus are fine). Allow the common idiom of declaring the loop variable in a for
loop.

This tries to codify what common exceptions are today, as well as give
some guidance on when it's best to do these things.

Reviewed by: tsoome, kp, markm, allanjude, jiles, cem, rpokala
(earlier versions: seanc, melifaro, bapt, pjd, bz, pstef, arichards,

	 jhibits, vangyzen, jmallet, ian, glebius, jhb, dab, adrian,
	 sef, gnn)

Differential Revision: https://reviews.freebsd.org/D25312

Details

Provenance
impAuthored on
Reviewer
tsoome
Differential Revision
D25312: Relax the rule against declaring variables in nested scopes.
Parents
rS363249: vfs: fix vn_poll performance with either MAC or AUDIT
Branches
Unknown
Tags
Unknown