lkml.org 
[lkml]   [2021]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][next] wireless: wext-spy: Fix out-of-bounds warning
From
Date


On 4/22/21 02:04, Johannes Berg wrote:
> On Wed, 2021-04-21 at 18:43 -0500, Gustavo A. R. Silva wrote:
>>
>>   /* Just do it */
>> - memcpy(&(spydata->spy_thr_low), &(threshold->low),
>> - 2 * sizeof(struct iw_quality));
>> + memcpy(&spydata->spy_thr_low, &threshold->low, sizeof(threshold->low));
>> + memcpy(&spydata->spy_thr_high, &threshold->high, sizeof(threshold->high));
>>
>
> It would've been really simple to stick to 80 columns here (and
> everywhere in the patch), please do that.
>
> Also, why not just use struct assigments?
>
> spydata->spy_thr_low = threshold->low;
>
> etc.
> Done: https://lore.kernel.org/lkml/20210422200032.GA168995@embeddedor/
> Seems far simpler (and shorter lines).

Done:
https://lore.kernel.org/lkml/20210422200032.GA168995@embeddedor/

Thanks for the feedback.
--
Gustavo

\
 
 \ /
  Last update: 2021-04-22 22:03    [W:0.044 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site