summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2023-03-27 03:31:06 +0000
committerDamien Miller <djm@cvs.openbsd.org>2023-03-27 03:31:06 +0000
commit2ce1da978e235cfbf65e70c3ab1cb1a8be148e31 (patch)
treeb20bb9dd70b9d2d77b2f55376daedf01b5a35e9e /usr.bin
parenta4c6dd4e8e3a63f7d87c391b7828b056cffbd5f9 (diff)
fix test: getnameinfo returns a non-zero value on error,
not (neccessarily) -1. From GHPR#384
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/addr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/addr.c b/usr.bin/ssh/addr.c
index 056f15903c5..a50ae8e06eb 100644
--- a/usr.bin/ssh/addr.c
+++ b/usr.bin/ssh/addr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: addr.c,v 1.6 2022/10/28 02:29:34 djm Exp $ */
+/* $OpenBSD: addr.c,v 1.7 2023/03/27 03:31:05 djm Exp $ */
/*
* Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -439,7 +439,7 @@ addr_ntop(const struct xaddr *n, char *p, size_t len)
if (p == NULL || len == 0)
return -1;
if (getnameinfo(_SA(&ss), slen, p, len, NULL, 0,
- NI_NUMERICHOST) == -1)
+ NI_NUMERICHOST) != 0)
return -1;
return 0;