staging: wilc1000: Avoid unnecessary braces around else.
PATCH 1/1 staging: wilc1000: Avoid unnecessary braces around else.
Remove unnecessary brace around else statement.
Issue found using checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks
--- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -2
@@ -1399,9 +1399,8 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,if (ies) { conn_info->req_ies_len = ies_len; conn_info->req_ies =kmemdup (ies, ies_len,GFP_KERNEL ); -if (!conn_info->req_ies) { +if (!conn_info->req_ies)return -ENOMEM ; - } } result =wilc_send_connect_wid (vif);
Signature · 1 line
2.17.1
Quoted 1 line · Sanjana Sanikommu
Remove unnecessary brace around else statement.
The braces are indeed unnecessary, but there is no else in this code.
julia
Quoted 34 lines
Issue found using checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by Sanjana Sanikommu <[email protected]>--- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/wilc1000/host_interface.c +1
-3@@ -1399,9 +1399,8 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,if (ies) { conn_info->req_ies_len = ies_len; conn_info->req_ies =kmemdup (ies, ies_len,GFP_KERNEL ); -if (!conn_info->req_ies) { +if (!conn_info->req_ies)return -ENOMEM ; - } } result =wilc_send_connect_wid (vif); --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190328181705.32572-1-sanjana99reddy99%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 8 lines · On Fri, 29 Mar 2019, 00:17 Julia Lawall, <[email protected]> wrote:
Quoted 1 line · Sanjana Sanikommu
Remove unnecessary brace around else statement.
The braces are indeed unnecessary, but there is no else in this code.
I will change to "if".
Thank you
Sanjana
Quoted 45 lines
julia
Review
Quoted 10 lines
Issue found using checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by Sanjana Sanikommu <[email protected]>--- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)(quoted diff) +0
-0
b/drivers/staging/wilc1000/host_interface.cdrivers/staging/wilc1000/host_interface.c int wilc_set_join_req(struct wilc_vif *vif, u8
Quoted 4 lines
index
a10c31bce07f..150ba033198f100644drivers/staging/wilc1000/host_interface.c +0
-0@@ -1399,9 +1399,8 @@ int wilc_set_join_req(struct wilc_vif *vif, u8*bssid, const u8 *ies,
Quoted 13 lines
drivers/staging/wilc1000/host_interface.c +1
-3if (ies) { conn_info->req_ies_len = ies_len; conn_info->req_ies =kmemdup (ies, ies_len,GFP_KERNEL ); -if (!conn_info->req_ies) { +if (!conn_info->req_ies)return -ENOMEM ; - } } result =wilc_send_connect_wid (vif); --2.17.1
Quoted 2 lines
--
You received this message because you are subscribed to the GoogleGroups "outreachy-kernel" group.
Quoted 1 line
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
Quoted 2 lines
To post to this group, send email to [email protected]. To view this discussion on the web visit
Quoted 2 lines
For more options, visit https://groups.google.com/d/optout.