staging: wlan-ng: Remove unnecessary variable usage
PATCH v2 1/1 staging: wlan-ng: Remove unnecessary variable usage
Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by Rehas Sachdeva <[email protected]>
---
Change in v2:
Correct the commit message. The return value is not the result of a function call but a constant.
drivers/staging/wlan-ng/prism2mgmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +1 -3
@@ -685,9 +685,7 @@ failed: msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters; done: - result =0 ; - -return result; +return 0 ; }/*----------------------------------------------------------------
Signature · 1 line
2.7.4