policy: remove redundant candidate evaluation
authorDavid Bauer <mail@david-bauer.net>
Sat, 25 Dec 2021 16:36:39 +0000 (17:36 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sat, 25 Dec 2021 16:40:23 +0000 (17:40 +0100)
It is not necessary to check if the candidate is not considered
reverse-better, as this is already done inside is_better_candidate for
all relevant criteria.

Signed-off-by: David Bauer <mail@david-bauer.net>
policy.c

index 04a1b3c8ccd2443e01d535f80115e8add130b847..95c2843fed0c459d86e6ba6dfe16d049fcd2bc44 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -115,9 +115,6 @@ find_better_candidate(struct sta_info *si_ref, struct uevent *ev, uint32_t requi
                if (!reasons)
                        continue;
 
-               if (is_better_candidate(si, si_ref))
-                       continue;
-
                if (!(reasons & required_criteria))
                        continue;