diff options
author | Thomas Haller <thaller@redhat.com> | 2020-03-22 11:05:11 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-03-22 11:07:37 +0100 |
commit | 277044de109ad2c87988437093a92458f49a2b84 (patch) | |
tree | b89b4a22942ff1d56eefc2ff842aaddcd061253d /src/supplicant | |
parent | 7ccd2bb35e68af7e6abc27ef69e160c4baf92baf (diff) | |
download | NetworkManager-277044de109ad2c87988437093a92458f49a2b84.tar.gz |
core/wifi: minor cleanup in _bss_info_properties_changed()
Move local variables to inner scope.
Also, drop code comment that doesn't give additional information
beyond what is already plainly visible in source code.
Diffstat (limited to 'src/supplicant')
-rw-r--r-- | src/supplicant/nm-supplicant-interface.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index b9f6e51d2d..d91d1ca3b1 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -481,8 +481,6 @@ _bss_info_properties_changed (NMSupplicantInterface *self, guint8 p_signal_percent; const guint8 *arr_data; gsize arr_len; - gboolean p_metered; - gboolean p_owe_transition_mode = FALSE; guint32 p_max_rate; gboolean p_max_rate_has; gint64 now_msec = 0; @@ -628,6 +626,8 @@ _bss_info_properties_changed (NMSupplicantInterface *self, } v_v = nm_g_variant_lookup_value (properties, "IEs", G_VARIANT_TYPE_BYTESTRING); if (v_v) { + gboolean p_owe_transition_mode; + gboolean p_metered; guint32 rate; arr_data = g_variant_get_fixed_array (v_v, &arr_len, 1); @@ -636,8 +636,6 @@ _bss_info_properties_changed (NMSupplicantInterface *self, p_max_rate_has = TRUE; g_variant_unref (v_v); - - /* Add OWE Security type if OWE transition mode is available */ if (p_owe_transition_mode) bss_info->rsn_flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE; else @@ -648,7 +646,6 @@ _bss_info_properties_changed (NMSupplicantInterface *self, if (p_max_rate_has) bss_info->max_rate = p_max_rate / 1000u; - v_v = nm_g_variant_lookup_value (properties, "WPA", G_VARIANT_TYPE_VARDICT); if (v_v) { bss_info->wpa_flags = security_from_vardict (v_v); |