From: Martin Pool Date: Tue, 15 Jan 2002 10:04:11 +0000 (+0000) Subject: Oops, getaddrinfo returns an error code (not -1) for error. -Wall is X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/98355b80864de1c52ffbdcf6855dabaa8a84b4a9 Oops, getaddrinfo returns an error code (not -1) for error. -Wall is good. --- diff --git a/socket.c b/socket.c index 520c3d5c..57d895d8 100644 --- a/socket.c +++ b/socket.c @@ -110,7 +110,7 @@ int try_bind_local(int s, bhints.ai_family = ai_family; bhints.ai_socktype = ai_socktype; bhints.ai_flags = AI_PASSIVE; - if (getaddrinfo(bind_address, NULL, &bhints, &bres_all) == -1) { + if ((error = getaddrinfo(bind_address, NULL, &bhints, &bres_all))) { rprintf(FERROR, RSYNC_NAME ": getaddrinfo %s: %s\n", bind_address, gai_strerror(error)); return -1;