From: Simon Ruderich Date: Mon, 2 Dec 2013 22:29:12 +0000 (+0100) Subject: Don't remove const qualifier in cast. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=dc1a0912c69d0f8eafdacc841b20750a2b270bb5;p=socket2unix%2Fsocket2unix.git Don't remove const qualifier in cast. --- diff --git a/src/socket2unix.c b/src/socket2unix.c index 6f9f0c7..27f8d68 100644 --- a/src/socket2unix.c +++ b/src/socket2unix.c @@ -370,10 +370,10 @@ static int set_sockaddr_un(struct sockaddr_un *sockaddr, int port; if (addr->sa_family == AF_INET) { af = "v4"; - port = ntohs(((struct sockaddr_in *)addr)->sin_port); + port = ntohs(((const struct sockaddr_in *)addr)->sin_port); } else if (addr->sa_family == AF_INET6) { af = "v6"; - port = ntohs(((struct sockaddr_in6 *)addr)->sin6_port); + port = ntohs(((const struct sockaddr_in6 *)addr)->sin6_port); } else { af = "unknown"; port = 0;