Patchwork [2/2] hostapd: return error value on configuration check failure

login
register
mail settings
Submitter Baruch Siach
Date June 13, 2012, 4:08 a.m.
Message ID <4b4badf3bc97ab29f315fbd71b03c88d3da59e43.1339560456.git.baruch@tkos.co.il>
Download mbox | patch
Permalink /patch/164521/
State Accepted
Commit 17706d1c7604c2beac6d33ff39ceccd63aa9a33a
Headers show

Comments

Baruch Siach - June 13, 2012, 4:08 a.m.
Don't count errors since the number isn't used anyway.

Signed-hostap: Baruch Siach <baruch@tkos.co.il>
---
 hostapd/config_file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 65a53fe..6729e5c 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2490,7 +2490,7 @@  int hostapd_set_iface(struct hostapd_config *conf,
 
 	if (hostapd_config_check(conf)) {
 		wpa_printf(MSG_ERROR, "Configuration check failed");
-		errors++;
+		return -1;
 	}
 
 	return 0;