diff options
author | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-10-09 22:59:48 +0100 |
commit | 4213eec74e74de6310c27a40c3e9759a08a73996 (patch) | |
tree | e97a6dcafc6763aea7c804e4e113c2750cb1400d /canohost.c | |
parent | 102062f825fb26a74295a1c089c00c4c4c76b68a (diff) | |
parent | cdf1d0a9f5d18535e0a18ff34860e81a6d83aa5c (diff) |
Import openssh_8.1p1.orig.tar.gz
Diffstat (limited to 'canohost.c')
-rw-r--r-- | canohost.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/canohost.c b/canohost.c index f71a08568..abea9c6e6 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: canohost.c,v 1.73 2016/03/07 19:02:43 djm Exp $ */ | 1 | /* $OpenBSD: canohost.c,v 1.74 2019/06/28 13:35:04 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -164,12 +164,12 @@ get_sock_port(int sock, int local) | |||
164 | fromlen = sizeof(from); | 164 | fromlen = sizeof(from); |
165 | memset(&from, 0, sizeof(from)); | 165 | memset(&from, 0, sizeof(from)); |
166 | if (local) { | 166 | if (local) { |
167 | if (getsockname(sock, (struct sockaddr *)&from, &fromlen) < 0) { | 167 | if (getsockname(sock, (struct sockaddr *)&from, &fromlen) == -1) { |
168 | error("getsockname failed: %.100s", strerror(errno)); | 168 | error("getsockname failed: %.100s", strerror(errno)); |
169 | return 0; | 169 | return 0; |
170 | } | 170 | } |
171 | } else { | 171 | } else { |
172 | if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) { | 172 | if (getpeername(sock, (struct sockaddr *)&from, &fromlen) == -1) { |
173 | debug("getpeername failed: %.100s", strerror(errno)); | 173 | debug("getpeername failed: %.100s", strerror(errno)); |
174 | return -1; | 174 | return -1; |
175 | } | 175 | } |