]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
ACS: Clean up ifdef CONFIG_ACS to avoid unreachable code
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 25 Apr 2014 20:43:00 +0000 (23:43 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 09:52:10 +0000 (12:52 +0300)
The conf->channel assignment was unreachable if CONFIG_ACS was not
defined, so move that to be under #else.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd/config_file.c

index 5f8428105a5afb97fe5ed339a35a44315d9a4834..c65d384a72ea694d0a6b6e29b97ed9954165fbef 100644 (file)
@@ -2445,8 +2445,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                        wpa_printf(MSG_ERROR, "Line %d: tries to enable ACS but CONFIG_ACS disabled",
                                   line);
                        return 1;
-#endif /* CONFIG_ACS */
+#else /* CONFIG_ACS */
                        conf->channel = 0;
+#endif /* CONFIG_ACS */
                } else
                        conf->channel = atoi(pos);
        } else if (os_strcmp(buf, "chanlist") == 0) {