From 12a81b64e17286a6ab4f6720fb47022e4d44fdc7 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 7 Jan 2016 16:50:53 +0200 Subject: [PATCH] ACS: Remove unreachable case from a debug print n_chans can have only values 1, 2, or 4 in this function, so the -1 case could never be reached. Remove the unreachable case to get rid of static analyzer warnings. Signed-off-by: Jouni Malinen --- src/ap/acs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ap/acs.c b/src/ap/acs.c index 0795af00b..5e8380535 100644 --- a/src/ap/acs.c +++ b/src/ap/acs.c @@ -599,8 +599,7 @@ acs_find_ideal_chan(struct hostapd_iface *iface) wpa_printf(MSG_DEBUG, "ACS: Survey analysis for selected bandwidth %d MHz", n_chans == 1 ? 20 : n_chans == 2 ? 40 : - n_chans == 4 ? 80 : - -1); + 80); for (i = 0; i < iface->current_mode->num_channels; i++) { double total_weight;