Skip to content

Commit

Permalink
daemon.c:handle: Remove unneeded check for null pointer.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Beller authored and Junio C Hamano committed Jul 15, 2013
1 parent f59bebb commit 5d9cfa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5d9cfa2

Please sign in to comment.