From 5af1fe34b617a06be8ee96e1456e26a588fd4eda Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 14 Dec 2023 10:01:06 -0800 Subject: [PATCH] network: remove 'path' from settings_load_pt_ecc The path argument was used purely for debugging. It can be just as informational printing just the SSID of the profile that failed to parse the setting without requiring callers allocate a string to call the function. --- src/network.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/network.c b/src/network.c index b6723fa9..3918ae08 100644 --- a/src/network.c +++ b/src/network.c @@ -582,7 +582,6 @@ int network_handshake_setup(struct network *network, struct scan_bss *bss, } static int network_settings_load_pt_ecc(struct network *network, - const char *path, unsigned int group, struct l_ecc_point **out_pt) { @@ -607,7 +606,7 @@ static int network_settings_load_pt_ecc(struct network *network, return 0; bad_format: - l_error("%s: invalid %s format", path, key); + l_error("%s profile: invalid %s format", network->ssid, key); generate: if (!network->passphrase) @@ -686,12 +685,10 @@ static int network_load_psk(struct network *network, struct scan_bss *bss) network->passphrase = l_steal_ptr(passphrase); network->password_identifier = l_steal_ptr(password_id); - if (network_settings_load_pt_ecc(network, path, - 19, &network->sae_pt_19) > 0) + if (network_settings_load_pt_ecc(network, 19, &network->sae_pt_19) > 0) network->sync_settings = true; - if (network_settings_load_pt_ecc(network, path, - 20, &network->sae_pt_20) > 0) + if (network_settings_load_pt_ecc(network, 20, &network->sae_pt_20) > 0) network->sync_settings = true; network->psk = l_steal_ptr(psk);