diff mbox

remove duplicate dl_list_init for global_ctrl_dst

Message ID 1477048316-27635-1-git-send-email-michael-dev@fami-braun.de
State Accepted
Headers show

Commit Message

michael-dev Oct. 21, 2016, 11:11 a.m. UTC
Commit 56885eecf402 ("hostapd: Add UDP support for ctrl_iface") added
dl_list_init for global_ctrl_dst to hostapd_global_ctrl_iface_init.

Though, hostapd_global_ctrl_iface_init is only called from main.c:main,
which already initializes global_ctrl_dst unconditionally before.
Save with global_ctrl_sock.

Remove this duplicate initialization.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
---
 hostapd/ctrl_iface.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jouni Malinen Oct. 28, 2016, 10:32 p.m. UTC | #1
On Fri, Oct 21, 2016 at 01:11:56PM +0200, Michael Braun wrote:
> Commit 56885eecf402 ("hostapd: Add UDP support for ctrl_iface") added
> dl_list_init for global_ctrl_dst to hostapd_global_ctrl_iface_init.
> 
> Though, hostapd_global_ctrl_iface_init is only called from main.c:main,
> which already initializes global_ctrl_dst unconditionally before.
> Save with global_ctrl_sock.
> 
> Remove this duplicate initialization.

Thanks, applied.
diff mbox

Patch

diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index d563831..dadc4b7 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3506,8 +3506,6 @@  int hostapd_global_ctrl_iface_init(struct hapd_interfaces *interface)
 		}
 	}
 
-	dl_list_init(&interface->global_ctrl_dst);
-	interface->global_ctrl_sock = -1;
 	os_get_random(gcookie, COOKIE_LEN);
 
 #ifdef CONFIG_CTRL_IFACE_UDP_REMOTE