Oops, getaddrinfo returns an error code (not -1) for error. -Wall is

good.
This commit is contained in:
Martin Pool
2002-01-15 10:04:11 +00:00
parent 70ed474b38
commit 98355b8086

View File

@@ -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;