summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoritojun <>2000-05-15 10:50:39 +0000
committeritojun <>2000-05-15 10:50:39 +0000
commitbd1c0bbbae183e67955577b5359cd10c18b9179f (patch)
tree09409edf16b03ecb4e565b9c7b706e61dbf6a599
parentb7b4ba04fa9a2ae7989a918cf5a3e6f6fd0ebd77 (diff)
downloadopenbsd-bd1c0bbbae183e67955577b5359cd10c18b9179f.tar.gz
openbsd-bd1c0bbbae183e67955577b5359cd10c18b9179f.tar.bz2
openbsd-bd1c0bbbae183e67955577b5359cd10c18b9179f.zip
correct type of 2nd argument to meet RFC2553. (this should raise no ABI
problem due to type promotion). PR 1228.
-rw-r--r--src/lib/libc/net/getnameinfo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libc/net/getnameinfo.c b/src/lib/libc/net/getnameinfo.c
index 673ead74ba..54d26485fb 100644
--- a/src/lib/libc/net/getnameinfo.c
+++ b/src/lib/libc/net/getnameinfo.c
@@ -1,10 +1,10 @@
1/* $OpenBSD: getnameinfo.c,v 1.14 2000/04/26 16:08:12 itojun Exp $ */ 1/* $OpenBSD: getnameinfo.c,v 1.15 2000/05/15 10:50:39 itojun Exp $ */
2/* $KAME: getnameinfo.c,v 1.38 2000/04/26 15:58:50 itojun Exp $ */ 2/* $KAME: getnameinfo.c,v 1.38 2000/04/26 15:58:50 itojun Exp $ */
3 3
4/* 4/*
5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
@@ -16,7 +16,7 @@
16 * 3. Neither the name of the project nor the names of its contributors 16 * 3. Neither the name of the project nor the names of its contributors
17 * may be used to endorse or promote products derived from this software 17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission. 18 * without specific prior written permission.
19 * 19 *
20 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 20 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -89,7 +89,7 @@ struct sockinet {
89static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *, 89static int ip6_parsenumeric __P((const struct sockaddr *, const char *, char *,
90 size_t, int)); 90 size_t, int));
91static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int)); 91static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
92#endif 92#endif
93 93
94#define ENI_NOSOCKET 0 94#define ENI_NOSOCKET 0
95#define ENI_NOSERVNAME 1 95#define ENI_NOSERVNAME 1
@@ -102,7 +102,7 @@ static int ip6_sa2str __P((const struct sockaddr_in6 *, char *, size_t, int));
102int 102int
103getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) 103getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
104 const struct sockaddr *sa; 104 const struct sockaddr *sa;
105 size_t salen; 105 socklen_t salen;
106 char *host; 106 char *host;
107 size_t hostlen; 107 size_t hostlen;
108 char *serv; 108 char *serv;
@@ -352,7 +352,7 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
352 return(snprintf(buf, bufsiz, "%d", sa6->sin6_scope_id)); 352 return(snprintf(buf, bufsiz, "%d", sa6->sin6_scope_id));
353 } 353 }
354#endif 354#endif
355 355
356 /* if_indextoname() does not take buffer size. not a good api... */ 356 /* if_indextoname() does not take buffer size. not a good api... */
357 if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) && 357 if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) &&
358 bufsiz >= IF_NAMESIZE) { 358 bufsiz >= IF_NAMESIZE) {