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-Tag: v2.5.2pre1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98355b80864de1c52ffbdcf6855dabaa8a84b4a9;p=thirdparty%2Frsync.git 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;