Patchwork [1/2] hostapd: remove redundant variable initialization

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

Comments

Baruch Siach - June 13, 2012, 4:08 a.m.
The 'errors' variable is initialized later anyway.

Signed-hostap: Baruch Siach <baruch@tkos.co.il>
---
 hostapd/config_file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jouni Malinen - June 16, 2012, 5:31 p.m.
Thanks, both patches applied.

Patch

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index eab8ad4..65a53fe 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2475,7 +2475,7 @@  struct hostapd_config * hostapd_config_read(const char *fname)
 int hostapd_set_iface(struct hostapd_config *conf,
 		      struct hostapd_bss_config *bss, char *field, char *value)
 {
-	int errors = 0;
+	int errors;
 	size_t i;
 
 	errors = hostapd_config_fill(conf, bss, field, value, 0);