lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CFEEE81102D91947B9CC368106979EBA479BEBE6@ORSMSX105.amr.corp.intel.com>
Date:	Thu, 31 Jul 2014 23:56:19 +0000
From:	"Abodunrin, Akeem G" <akeem.g.abodunrin@...el.com>
To:	David Miller <davem@...emloft.net>,
	"Brown, Aaron F" <aaron.f.brown@...el.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>
Subject: RE: [net-next 06/15] i40e: Move some variable declarations out of a
 loop



> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Thursday, July 31, 2014 2:06 PM
> To: Brown, Aaron F
> Cc: Abodunrin, Akeem G; netdev@...r.kernel.org; gospo@...hat.com;
> sassmann@...hat.com
> Subject: Re: [net-next 06/15] i40e: Move some variable declarations out of a
> loop
> 
> From: Aaron Brown <aaron.f.brown@...el.com>
> Date: Wed, 30 Jul 2014 17:32:02 -0700
> 
> > From: Akeem G Abodunrin <akeem.g.abodunrin@...el.com>
> >
> > 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 <akeem.g.abodunrin@...el.com>
> > Tested-by: Jim Young <jamesx.m.young@...el.com>
> > Signed-off-by: Aaron Brown <aaron.f.brown@...el.com>
> 
> 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.

This is done because other codes have to use it before the loop...

Hope you understand the reason for this - and that is how it supposed to be originally, we have to increase the scope of the variables so that other code that are not in the loop can use it.

Regards,
~Akeem G Abodunrin
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ