Search Linux Wireless

Re: [PATCH 2/8] ath5k: Simplify loop when setting up channels

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

 



On Wed, Jan 19, 2011 at 4:20 AM, Bruno Randolf <br1@xxxxxxxxxxx> wrote:
> Simplify confusing code and get rid of an unnecessary variable.
>
> Signed-off-by: Bruno Randolf <br1@xxxxxxxxxxx>


> @@ -285,8 +285,8 @@ ath5k_copy_channels(struct ath5k_hw *ah,
>                return 0;
>        }
>
> -       for (i = 0, count = 0; i < size && max > 0; i++) {
> -               ch = i + 1 ;
> +       count = 0;
> +       for (ch = 1; ch < size && count <= max; ch++) {

Should be <= size now, right?  And maybe rename size to max_channel
or something like that.

-- 
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux