diff options
author | Thomas Haller <thaller@redhat.com> | 2022-03-19 00:53:16 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-29 11:52:37 +0200 |
commit | 47f2c5e5dbd4fe894921362f4982c21a4ddc0423 (patch) | |
tree | 6949683a797358625977bc3ac95474218c2230a5 | |
parent | a3aec9dc5ca1a69043a2b60522595dc31127a4f1 (diff) | |
download | NetworkManager-47f2c5e5dbd4fe894921362f4982c21a4ddc0423.tar.gz |
libnm/802-1x: cleanup need_secrets_phase2()
-rw-r--r-- | src/libnm-core-impl/nm-setting-8021x.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libnm-core-impl/nm-setting-8021x.c b/src/libnm-core-impl/nm-setting-8021x.c index a9cafde1c2..b744ea635f 100644 --- a/src/libnm-core-impl/nm-setting-8021x.c +++ b/src/libnm-core-impl/nm-setting-8021x.c @@ -2751,17 +2751,14 @@ need_secrets_phase2(NMSetting8021x *self, GPtrArray *secrets, gboolean phase2) if (!method) method = priv->phase2_autheap; - if (!method) { - g_warning("Couldn't find EAP method."); - g_assert_not_reached(); - return; - } + if (!method) + g_return_if_reached(); /* Ask the configured phase2 method if it needs secrets */ for (i = 0; eap_methods_table[i].method; i++) { - if (eap_methods_table[i].ns_func == NULL) + if (!eap_methods_table[i].ns_func) continue; - if (!strcmp(eap_methods_table[i].method, method)) { + if (nm_streq(eap_methods_table[i].method, method)) { (*eap_methods_table[i].ns_func)(self, secrets, TRUE); break; } |