about summary refs log tree commit diff
path: root/inet
diff options
context:
space:
mode:
Diffstat (limited to 'inet')
-rw-r--r--inet/rcmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 6c01f96811..16ad02b438 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -615,8 +615,9 @@ __checkhost_sa (struct sockaddr *ra, size_t ralen, char *lhost,
 	/* XXX */
 	if (getnameinfo(ra, ralen,
 			raddr, sizeof(raddr), NULL, 0,
-			NI_NUMERICHOST) == 0)
-		return negate * (strcmp(raddr, lhost) == 0);
+			NI_NUMERICHOST) == 0
+	    && strcmp(raddr, lhost) == 0)
+		return negate;
 
 	/* Better be a hostname. */
 	match = 0;