ansi pedantic. sync w/kame
This commit is contained in:
parent
2237adde2a
commit
4df4d0a437
@ -1,5 +1,5 @@
|
||||
/* $NetBSD: ping6.c,v 1.46 2002/05/31 01:10:54 itojun Exp $ */
|
||||
/* $KAME: ping6.c,v 1.155 2002/05/26 13:18:25 itojun Exp $ */
|
||||
/* $NetBSD: ping6.c,v 1.47 2002/09/08 14:31:41 itojun Exp $ */
|
||||
/* $KAME: ping6.c,v 1.160 2002/09/08 14:28:18 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -81,7 +81,7 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: ping6.c,v 1.46 2002/05/31 01:10:54 itojun Exp $");
|
||||
__RCSID("$NetBSD: ping6.c,v 1.47 2002/09/08 14:31:41 itojun Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -270,7 +270,7 @@ void pr_nodeaddr __P((struct icmp6_nodeinfo *, int));
|
||||
int myechoreply __P((const struct icmp6_hdr *));
|
||||
int mynireply __P((const struct icmp6_nodeinfo *));
|
||||
char *dnsdecode __P((const u_char **, const u_char *, const u_char *,
|
||||
u_char *, size_t));
|
||||
char *, size_t));
|
||||
void pr_pack __P((u_char *, int, struct msghdr *));
|
||||
void pr_exthdrs __P((struct msghdr *));
|
||||
void pr_ip6opt __P((void *));
|
||||
@ -926,7 +926,8 @@ main(argc, argv)
|
||||
* get the source address. XXX since we revoked the root
|
||||
* privilege, we cannot use a raw socket for this.
|
||||
*/
|
||||
int dummy, len = sizeof(src);
|
||||
int dummy;
|
||||
socklen_t len = sizeof(src);
|
||||
|
||||
if ((dummy = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
|
||||
err(1, "UDP socket");
|
||||
@ -1362,7 +1363,7 @@ dnsdecode(sp, ep, base, buf, bufsiz)
|
||||
const u_char **sp;
|
||||
const u_char *ep;
|
||||
const u_char *base; /*base for compressed name*/
|
||||
u_char *buf;
|
||||
char *buf;
|
||||
size_t bufsiz;
|
||||
{
|
||||
int i;
|
||||
@ -1379,7 +1380,7 @@ dnsdecode(sp, ep, base, buf, bufsiz)
|
||||
while (cp < ep) {
|
||||
i = *cp;
|
||||
if (i == 0 || cp != *sp) {
|
||||
if (strlcat(buf, ".", bufsiz) >= bufsiz)
|
||||
if (strlcat((char *)buf, ".", bufsiz) >= bufsiz)
|
||||
return NULL; /*result overrun*/
|
||||
}
|
||||
if (i == 0)
|
||||
@ -2635,7 +2636,7 @@ nigroup(name)
|
||||
char *name;
|
||||
{
|
||||
char *p;
|
||||
unsigned char *q;
|
||||
char *q;
|
||||
MD5_CTX ctxt;
|
||||
u_int8_t digest[16];
|
||||
u_int8_t c;
|
||||
@ -2653,8 +2654,8 @@ nigroup(name)
|
||||
hbuf[(int)l] = '\0';
|
||||
|
||||
for (q = name; *q; q++) {
|
||||
if (isupper(*q))
|
||||
*q = tolower(*q);
|
||||
if (isupper(*(unsigned char *)q))
|
||||
*q = tolower(*(unsigned char *)q);
|
||||
}
|
||||
|
||||
/* generate 8 bytes of pseudo-random value. */
|
||||
@ -2662,7 +2663,7 @@ nigroup(name)
|
||||
MD5Init(&ctxt);
|
||||
c = l & 0xff;
|
||||
MD5Update(&ctxt, &c, sizeof(c));
|
||||
MD5Update(&ctxt, name, l);
|
||||
MD5Update(&ctxt, (unsigned char *)name, l);
|
||||
MD5Final(digest, &ctxt);
|
||||
|
||||
if (inet_pton(AF_INET6, "ff02::2:0000:0000", &in6) != 1)
|
||||
|
Loading…
Reference in New Issue
Block a user