From 69629196833dfac3619b665ea11b6966097733c4 Mon Sep 17 00:00:00 2001 From: CraftingDragon007 Date: Tue, 4 Nov 2025 15:24:01 +0100 Subject: [PATCH] Updated unneeded else if queries to be just else --- rebind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rebind.c b/rebind.c index 97bc591..42f7b5f 100644 --- a/rebind.c +++ b/rebind.c @@ -58,7 +58,7 @@ int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) const struct sockaddr_in *addr_in = (const struct sockaddr_in *)addr; askport = ntohs(addr_in->sin_port); inet_ntop(AF_INET, &addr_in->sin_addr, addr_str, sizeof(addr_str)); - } else if (family == AF_INET6) { + } else { const struct sockaddr_in6 *addr_in6 = (const struct sockaddr_in6 *)addr; askport = ntohs(addr_in6->sin6_port); inet_ntop(AF_INET6, &addr_in6->sin6_addr, addr_str, sizeof(addr_str)); @@ -105,7 +105,7 @@ int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) struct sockaddr_in *addr_in_tmp = (struct sockaddr_in *)&addr_tmp; addr_in_tmp->sin_addr.s_addr = htonl(INADDR_LOOPBACK); addr_in_tmp->sin_port = htons(newport); - } else if (family == AF_INET6) { + } else { struct sockaddr_in6 *addr_in6_tmp = (struct sockaddr_in6 *)&addr_tmp; static const struct in6_addr v4_loopback_mapped = { // ::ffff:127.0.0.1 .s6_addr = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 127, 0, 0, 1}