diff options
| author | Wojciech Dubowik | 2022-05-17 12:12:41 +0000 |
|---|---|---|
| committer | David Bauer | 2022-05-17 14:21:14 +0000 |
| commit | 7afab9604b580266a81935fb1d9df4c3b33831a3 (patch) | |
| tree | cb87b34ad9a97d6d0d73fc1cd7eda7cb43c63833 | |
| parent | d9b3877198180b4765614c16fc971670cee1d688 (diff) | |
| download | usteer-7afab9604b580266a81935fb1d9df4c3b33831a3.tar.gz | |
usteer: Fix better candidate not being set in policy
The candidate is never set in this loop. Fix it by setting it
to the first valid entry.
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com>
| -rw-r--r-- | policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -143,7 +143,7 @@ find_better_candidate(struct sta_info *si_ref, struct uevent *ev, uint32_t requi ev->select_reasons = reasons; } - if (candidate && si->signal > candidate->signal) + if (!candidate || si->signal > candidate->signal) candidate = si; } |