aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd_daemon.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-11-08 14:02:08 +0000
committerJoão Valverde <j@v6e.pt>2017-11-09 16:08:25 +0000
commit39967011836c1e23dff188ffaadb747d9dcda062 (patch)
tree768e37aa23b5ad8775a47543ce26f1fdb3f3269d /sharkd_daemon.c
parent2ebc41050e43c508edbc8c0fa8cccb9797c463cf (diff)
Replace inet_addr() with our inet_pton() wrapper
Error checking omitted like in original code. Change-Id: If8b4181d30ddf5717951aaf7ec61db25c0bc5322 Reviewed-on: https://code.wireshark.org/review/24309 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'sharkd_daemon.c')
-rw-r--r--sharkd_daemon.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sharkd_daemon.c b/sharkd_daemon.c
index c3dea96..f9b44cb 100644
--- a/sharkd_daemon.c
+++ b/sharkd_daemon.c
@@ -41,10 +41,7 @@
#endif
#include <wsutil/socket.h>
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
+#include <wsutil/inet_addr.h>
#ifndef _WIN32
#include <sys/un.h>
@@ -145,7 +142,7 @@ socket_init(char *path)
return INVALID_SOCKET;
s_in.sin_family = AF_INET;
- s_in.sin_addr.s_addr = inet_addr(path);
+ ws_inet_pton4(path, &(s_in.sin_addr.s_addr));
s_in.sin_port = g_htons(port);
*port_sep = ':';