summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-07-14 23:35:46 +0200
committerJunio C Hamano <gitster@pobox.com>2013-07-15 09:45:11 -0700
commit5d9cfa29d27156cc9a00c75eaa31b831107ed0b9 (patch)
tree772f8279ecda632bed6a18f45c611e5fcf4f9527 /daemon.c
parentf59bebb78edb26e4f66c2754bc4d168c5d4ebb4a (diff)
downloadgit-5d9cfa29d27156cc9a00c75eaa31b831107ed0b9.tar.gz
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>
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon.c b/daemon.c
index df8c0ab058..80df5cb54e 100644
--- a/daemon.c
+++ b/daemon.c
@@ -760,7 +760,7 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
snprintf(portbuf, sizeof(portbuf), "REMOTE_PORT=%d",
ntohs(sin_addr->sin_port));
#ifndef NO_IPV6
- } else if (addr && addr->sa_family == AF_INET6) {
+ } else if (addr->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6_addr = (void *) addr;
char *buf = addrbuf + 12;