[PATCH] Remove dead code in wpas_sched_scan_plans_set()
Chien Wong
m at xv97.com
Sat Aug 5 03:11:55 PDT 2023
I would revert the patch.
The removed check is not dead code and is needed.
Sorry to bother.
On 8/5/23 17:44, Chien Wong wrote:
> From 2f859aad66f5d04104382d9504ab31ef8c178577 Mon Sep 17 00:00:00 2001
> From: Chien Wong <m at xv97.com>
> Date: Sat, 5 Aug 2023 17:32:38 +0800
> Subject: [PATCH] Remove dead code in wpas_sched_scan_plans_set()
>
> The scan plans were consumed in the parsing loop. The removed check
> is bound to fail.
>
> Signed-off-by: Chien Wong <m at xv97.com>
> ---
> wpa_supplicant/scan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
> index c3984a40c..11c680353 100644
> --- a/wpa_supplicant/scan.c
> +++ b/wpa_supplicant/scan.c
> @@ -3441,7 +3441,7 @@ int wpas_sched_scan_plans_set(struct
> wpa_supplicant *wpa_s, const char *cmd)
> goto fail;
> }
>
> - if (cstr_token(cmd, " ", &context) || scan_plans[num -
> 1].iterations) {
> + if (scan_plans[num - 1].iterations) {
> wpa_printf(MSG_ERROR,
> "All scan plans but the last must specify a number of
> iterations");
> goto fail;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20230805/ffce9805/attachment.sig>
More information about the Hostap
mailing list