From 939371aa1dfdbf11fe98648e1eafc4c95e80bb9e Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Fri, 28 Jul 2017 18:44:18 +0100 Subject: [PATCH] Fix warnings. Signed-off-by: Edward Tomasz Napierala --- src/core/capsicum.c | 4 ++-- src/core/network.c | 2 +- src/core/network.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/capsicum.c b/src/core/capsicum.c index f44b326d..5a59adcd 100644 --- a/src/core/capsicum.c +++ b/src/core/capsicum.c @@ -93,7 +93,7 @@ int capsicum_net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip) int capsicum_net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6) { nvlist_t *nvl; - IPADDR *received_ip4, *received_ip6; + const IPADDR *received_ip4, *received_ip6; int error, ret, saved_errno; /* Send request to the symbiont. */ @@ -130,7 +130,7 @@ int capsicum_net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6) nvlist_t *symbiont_connect(const nvlist_t *request) { nvlist_t *response; - IPADDR *ip, *my_ip; + const IPADDR *ip, *my_ip; int port, saved_errno, sock; ip = nvlist_get_binary(request, "ip", NULL); diff --git a/src/core/network.c b/src/core/network.c index 2954af54..01e56eb5 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -147,7 +147,7 @@ GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip) return net_connect_ip(ip, port, my_ip); } -int net_connect_ip_handle(IPADDR *ip, int port, IPADDR *my_ip) +int net_connect_ip_handle(const IPADDR *ip, int port, const IPADDR *my_ip) { union sockaddr_union so; int handle, ret, opt = 1; diff --git a/src/core/network.h b/src/core/network.h index 5ccacc0d..d1582a2e 100644 --- a/src/core/network.h +++ b/src/core/network.h @@ -36,7 +36,7 @@ GIOChannel *g_io_channel_new(int handle); /* returns 1 if IPADDRs are the same */ int net_ip_compare(IPADDR *ip1, IPADDR *ip2); -int net_connect_ip_handle(IPADDR *ip, int port, IPADDR *my_ip); +int net_connect_ip_handle(const IPADDR *ip, int port, const IPADDR *my_ip); /* Connect to socket */ GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip) G_GNUC_DEPRECATED;