Re: [PATCH 1/1] staging: brcm80211: fix 'comparison..cast' compiler warnings.

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

 



On 10/10/2010 02:33 PM, Joe Perches wrote:
> On Sun, 2010-10-10 at 14:07 -0400, Jason Cooper wrote:
>> +++ b/drivers/staging/brcm80211/brcmfmac/wl_iw.c
> []
>> @@ -1280,9 +1280,9 @@ wl_iw_set_scan(struct net_device *dev,
>>  					__func__, req->essid));
>>  				return -EBUSY;
>>  			} else {
>> -				g_specific_ssid.SSID_len =
>> -				    min(sizeof(g_specific_ssid.SSID),
>> -					req->essid_len);
>> +				g_specific_ssid.SSID_len = min_t(unsigned char,
>> +						sizeof(g_specific_ssid.SSID),
>> +						req->essid_len);
> 
> You might be hiding truncation here.
> It might be better to use
> 
> 	min_t(size_t, sizeof(g_specific_ssid.SSID), req->essid_len);
> 

My next patch series will include this.

thx,

Jason.
_______________________________________________
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