ocb: remove unnecessary variable increments
PATCH 1/1 ocb: remove unnecessary variable increments
The arg[c|v] variables are incremented even if
they are not used afterwards. Fix that.
Signed-off-by Ola Olsson <[email protected]>
--- ocb.c | 3 --- 1 file changed, 3 deletions(-)
ocb.c +0 -3
@@ -33,7 +33,6 @@ static int join_ocb(struct nl80211_state *state,NLA_PUT_U32 (msg,NL80211_ATTR_WIPHY_FREQ , freq); argv++; - argc--;/* channel width */ for (i =0 ; i <ARRAY_SIZE (chanmode); i++) {
@@ -47,8 +46,6 @@ static int join_ocb(struct nl80211_state *state, chanmode_selected->width);NLA_PUT_U32 (msg,NL80211_ATTR_CENTER_FREQ1 , freq); - argv++; - argc--; }else {return 1 ; }
Signature · 1 line
1.7.9.5
Quoted 2 lines · Ola Olsson
The arg[c|v] variables are incremented even if
they are not used afterwards. Fix that.
Good find, thanks, but I think I'd rather leave the code as is - the compiler ought to discard the useless code anyway, but somebody editing it later might have it easier if it's already done.
johannes