From dc1a0912c69d0f8eafdacc841b20750a2b270bb5 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 2 Dec 2013 23:29:12 +0100 Subject: [PATCH] Don't remove const qualifier in cast. --- src/socket2unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.45.2