Re: [PATCH] Remove dead code in wpas_sched_scan_plans_set()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
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@xxxxxxxx>
---
 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;

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux