diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-27 09:24:29 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-27 09:24:29 +0000 |
commit | cea38283287689121306df45973ff5395525867c (patch) | |
tree | f9e1ca31f2029c34068da4262a661b11942ee0aa /lib/libc/net/getnameinfo.c | |
parent | 2b010360a75d71ff59947a7679fceac446ed48eb (diff) |
ntohs() returns unsigned value
Diffstat (limited to 'lib/libc/net/getnameinfo.c')
-rw-r--r-- | lib/libc/net/getnameinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c index 3f37d85d73e..2311eba7a02 100644 --- a/lib/libc/net/getnameinfo.c +++ b/lib/libc/net/getnameinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getnameinfo.c,v 1.24 2002/05/22 04:31:14 deraadt Exp $ */ +/* $OpenBSD: getnameinfo.c,v 1.25 2002/06/27 09:24:28 itojun Exp $ */ /* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */ /* @@ -148,7 +148,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) return EAI_MEMORY; strlcpy(serv, sp->s_name, servlen); } else { - snprintf(numserv, sizeof(numserv), "%d", ntohs(port)); + snprintf(numserv, sizeof(numserv), "%u", ntohs(port)); if (strlen(numserv) + 1 > servlen) return EAI_MEMORY; strlcpy(serv, numserv, servlen); |