[PATCH] Remove dead code in wpas_sched_scan_plans_set()

Chien Wong m at xv97.com
Sat Aug 5 02:44:56 PDT 2023


 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;
-- 
2.41.0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x5CA58A39FA4122AD.asc
Type: application/pgp-keys
Size: 644 bytes
Desc: OpenPGP public key
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20230805/5a683197/attachment.bin>
-------------- 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/5a683197/attachment.sig>


More information about the Hostap mailing list