]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unnecessary variable initialization
authorJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 14:19:41 +0000 (16:19 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 15:15:12 +0000 (17:15 +0200)
The following if statements set the new_op_mode value in all cases,
so there is no need to initialize this to 0 first. This removes a
static analyzer warning.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_11_ht.c

index 31dc47edd162d1dda799caab10741fb8029155aa..a16617833607072f8fe8f0a6d06c565248468b73 100644 (file)
@@ -139,7 +139,6 @@ int hostapd_ht_operation_update(struct hostapd_iface *iface)
                op_mode_changes++;
        }
 
-       new_op_mode = 0;
        if (iface->num_sta_no_ht)
                new_op_mode = OP_MODE_MIXED;
        else if (iface->conf->secondary_channel && iface->num_sta_ht_20mhz)