lkml.org 
[lkml]   [2019]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging: rtl8192e: Fix space and suspect issue
From
Date
On Thu, 2019-02-28 at 19:07 +0100, Oscar Gomez Fuente wrote:
> These changes fixed a checkpatch error for space required before the
> open brace '{' as well as a warning for suspect code indent for
> conditional statements.

Simple enough, thanks.

> diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
[]
> @@ -541,8 +541,8 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
> if (idx < 1 || idx > NUM_WEP_KEYS)

trivia:

the idx < 1 here test is superfluous as idx
is an int masked with 0xff and can't be < 1
if also non-zero

Original code:

idx = encoding->flags & IW_ENCODE_INDEX;
if (idx) {
if (idx < 1 || idx > NUM_WEP_KEYS)
return -EINVAL;
idx--;
}


\
 
 \ /
  Last update: 2019-02-28 21:28    [W:0.047 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site