[PATCH 6/6] Staging: bcm: Rename unnecessarily long local variables where appropriate.

Dan Carpenter dan.carpenter at oracle.com
Tue Jan 3 08:32:35 UTC 2012


On Mon, Jan 02, 2012 at 11:17:21PM -0500, Kevin McKinney wrote:
> This patch replaces unnecessarily long local variables
> used in for loops with more compact i and/or x for
> readability purposes.

I would say that "x" is almost always a bad name for a variable.
Traditionally if you have two loops, then you might use "i" for the
outside iterator and "j" for the inside iterator.  But really it's
often better to name your iterators in that case so there is no
confusion.

Many of these iterators don't need to be initialized.  Iterators
should be type "int" by default unless something extra special is
going on.

regards,
dan carpenter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20120103/7d2e9b3d/attachment.asc>


More information about the devel mailing list