From 744dd6bcbe7e078daac150d9e7be60c89985b510 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 14 Oct 2011 13:48:53 -0700 Subject: Fix const warnings. --- lib/socket/interfaces.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/socket') diff --git a/lib/socket/interfaces.c b/lib/socket/interfaces.c index 9bdecb243d..775956ba99 100644 --- a/lib/socket/interfaces.c +++ b/lib/socket/interfaces.c @@ -77,7 +77,7 @@ static void make_bcast_or_net(struct sockaddr_storage *pss_out, bool make_bcast_p) { unsigned int i = 0, len = 0; - char *pmask = NULL; + const char *pmask = NULL; char *p = NULL; *pss_out = *pss_in; @@ -85,13 +85,13 @@ static void make_bcast_or_net(struct sockaddr_storage *pss_out, #if defined(HAVE_IPV6) if (pss_in->ss_family == AF_INET6) { p = (char *)&((struct sockaddr_in6 *)pss_out)->sin6_addr; - pmask = discard_const_p(char, &((struct sockaddr_in6 *)nmask)->sin6_addr); + pmask = (const char *)&((const struct sockaddr_in6 *)nmask)->sin6_addr; len = 16; } #endif if (pss_in->ss_family == AF_INET) { p = (char *)&((struct sockaddr_in *)pss_out)->sin_addr; - pmask = discard_const_p(char, &((struct sockaddr_in *)nmask)->sin_addr); + pmask = (const char *)&((const struct sockaddr_in *)nmask)->sin_addr; len = 4; } -- cgit