Message ID | 72b32b97-9751-40a6-8817-e72d52cbd32c@xv97.com |
---|---|
State | Rejected |
Headers | show |
Series | Remove dead code in wpas_sched_scan_plans_set() | expand |
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@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@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;
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