Search Linux Wireless

Re: [patch 1/4 v2] rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()

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

 



On Thu, Mar 01, 2012 at 10:51:37AM +0100, bojan prtvar wrote:
> Hi,
> 
> 
> On Thu, Mar 1, 2012 at 8:02 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> >
> >
> >
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > ---
> > v2: Fixed a style issue for Walter Harms.  Changed > 0 to != 0.
> >
> 
> Why not just  if (req_ie_len) and if (resp_ie_len) ?
> 

It could go either way.  I wrote it that way first, then I decided
that zero was a special enough case to draw attention to it.  In
this case it felt like zero was its own thing.

For allocation failures I would do:
	foo = kmalloc();
	if (!foo)
		return -ENOMEM;
Allocation failures are not interesting and the NULL doesn't have a
special meaning and doesn't need explanation.

Hard to explain.

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux