Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ping6 ansi pedantic. sync w/kame
details: https://anonhg.NetBSD.org/src/rev/6368b841b42b
branches: trunk
changeset: 536126:6368b841b42b
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Sep 08 14:31:41 2002 +0000
description:
ansi pedantic. sync w/kame
diffstat:
sbin/ping6/ping6.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diffs (86 lines):
diff -r 8586561d11b8 -r 6368b841b42b sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c Sun Sep 08 09:28:23 2002 +0000
+++ b/sbin/ping6/ping6.c Sun Sep 08 14:31:41 2002 +0000
@@ -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 @@
#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 @@
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 @@
* 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 @@
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 @@
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 @@
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 @@
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 @@
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)
Home |
Main Index |
Thread Index |
Old Index