daemon.c:handle: Remove unneeded check for null pointer.
addr doesn't need to be checked at that line as it it already accessed 7 lines before in the if (addr->sa_family). Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Jul 14, 2013 at 23:35 UTC
5d9cfa29d27156cc9a00c75eaa31b831107ed0b9
1 file changed
+1
-1
daemon.c
+1
-1
@@ -760,7 +760,7 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
760
snprintf(portbuf, sizeof(portbuf), "REMOTE_PORT=%d",
761
ntohs(sin_addr->sin_port));
762
#ifndef NO_IPV6
763
- } else if (addr && addr->sa_family == AF_INET6) {
763
+ } else if (addr->sa_family == AF_INET6) {
764
struct sockaddr_in6 *sin6_addr = (void *) addr;
765
766
char *buf = addrbuf + 12;