diff mbox

[4/6] wpa_supplicant: remove not needed casts in ctrl UDP

Message ID 1443180684-7206-5-git-send-email-janusz.dziedzic@tieto.com
State Changes Requested
Headers show

Commit Message

Janusz.Dziedzic@tieto.com Sept. 25, 2015, 11:31 a.m. UTC
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 wpa_supplicant/ctrl_iface_udp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/wpa_supplicant/ctrl_iface_udp.c b/wpa_supplicant/ctrl_iface_udp.c
index ce6874c..217a1c4 100644
--- a/wpa_supplicant/ctrl_iface_udp.c
+++ b/wpa_supplicant/ctrl_iface_udp.c
@@ -267,19 +267,19 @@  static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx,
 		pos++;
 
 	if (os_strcmp(pos, "ATTACH") == 0) {
-		if (wpa_supplicant_ctrl_iface_attach(&priv->ctrl_dst, (struct sockaddr_storage *) &from, fromlen))
+		if (wpa_supplicant_ctrl_iface_attach(&priv->ctrl_dst, &from, fromlen))
 			reply_len = 1;
 		else {
 			new_attached = 1;
 			reply_len = 2;
 		}
 	} else if (os_strcmp(pos, "DETACH") == 0) {
-		if (wpa_supplicant_ctrl_iface_detach(&priv->ctrl_dst, (struct sockaddr_storage *)&from, fromlen))
+		if (wpa_supplicant_ctrl_iface_detach(&priv->ctrl_dst, &from, fromlen))
 			reply_len = 1;
 		else
 			reply_len = 2;
 	} else if (os_strncmp(pos, "LEVEL ", 6) == 0) {
-		if (wpa_supplicant_ctrl_iface_level(&priv->ctrl_dst, (struct sockaddr_storage *)&from, fromlen,
+		if (wpa_supplicant_ctrl_iface_level(&priv->ctrl_dst, &from, fromlen,
 						    pos + 6))
 			reply_len = 1;
 		else
@@ -529,7 +529,7 @@  static void wpa_supplicant_global_ctrl_iface_receive(int sock, void *eloop_ctx,
 	struct ctrl_iface_global_priv *priv = sock_ctx;
 	char buf[256], *pos;
 	int res;
-	struct sockaddr_in from;
+	struct sockaddr_storage from;
 	socklen_t fromlen = sizeof(from);
 	char *reply = NULL;
 	size_t reply_len;
@@ -573,12 +573,12 @@  static void wpa_supplicant_global_ctrl_iface_receive(int sock, void *eloop_ctx,
 		pos++;
 
 	if (os_strcmp(pos, "ATTACH") == 0) {
-		if (wpa_supplicant_ctrl_iface_attach(&priv->ctrl_dst, (struct sockaddr_storage *) &from, fromlen))
+		if (wpa_supplicant_ctrl_iface_attach(&priv->ctrl_dst, &from, fromlen))
 			reply_len = 1;
 		else
 			reply_len = 2;
 	} else if (os_strcmp(pos, "DETACH") == 0) {
-		if (wpa_supplicant_ctrl_iface_detach(&priv->ctrl_dst, (struct sockaddr_storage *)&from, fromlen))
+		if (wpa_supplicant_ctrl_iface_detach(&priv->ctrl_dst, &from, fromlen))
 			reply_len = 1;
 		else
 			reply_len = 2;