Thread (19 messages) 19 messages, 3 authors, 2014-08-01

Re: [net-next 06/15] i40e: Move some variable declarations out of a loop

From: David Miller <davem@davemloft.net>
Date: 2014-07-31 21:06:02

From: Aaron Brown <redacted>
Date: Wed, 30 Jul 2014 17:32:02 -0700
From: Akeem G Abodunrin <redacted>

Declare some variables once outside of the loop instead of in
every iteration of the loop.

Change-ID: I436913777c7da3c16dc0031b59e3ffa61de74718
Signed-off-by: Akeem G Abodunrin <redacted>
Tested-by: Jim Young <redacted>
Signed-off-by: Aaron Brown <redacted>
Why?  Decreasing the scope of variables makes the code easier to
understand and audit.

Now that it's declared at the top level people have to check whether
is it initialized properly in all possible code paths, in the entire
function, rather than just inside of the loop.

Please respin this series with this patch removed, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help