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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux