From d431ae68bb3b9d90f4077929b5b83199f0f3854e Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Mon, 28 Mar 1994 15:06:34 -0800 Subject: [PATCH] fix compiler warning From: ralphc@pyramid.com (Ralph Campbell) SCCS-vsn: sys/net/bpf.c 8.2 --- usr/src/sys/net/bpf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/usr/src/sys/net/bpf.c b/usr/src/sys/net/bpf.c index 9e63a7bed4..e788d96f36 100644 --- a/usr/src/sys/net/bpf.c +++ b/usr/src/sys/net/bpf.c @@ -9,7 +9,7 @@ * * %sccs.include.redist.c% * - * @(#)bpf.c 8.1 (Berkeley) %G% + * @(#)bpf.c 8.2 (Berkeley) %G% * * static char rcsid[] = * "$Header: bpf.c,v 1.33 91/10/27 21:21:58 mccanne Exp $"; @@ -102,7 +102,7 @@ static void bpf_freed __P((struct bpf_d *)); static void bpf_freed __P((struct bpf_d *)); static void bpf_ifname __P((struct ifnet *, struct ifreq *)); static void bpf_ifname __P((struct ifnet *, struct ifreq *)); -static void bpf_mcopy __P((void *, void *, u_int)); +static void bpf_mcopy __P((const void *, void *, u_int)); static int bpf_movein __P((struct uio *, int, struct mbuf **, struct sockaddr *, int *)); static int bpf_setif __P((struct bpf_d *, struct ifreq *)); @@ -110,7 +110,7 @@ static int bpf_setif __P((struct bpf_d *, struct ifreq *)); static inline void bpf_wakeup __P((struct bpf_d *)); static void catchpacket __P((struct bpf_d *, u_char *, u_int, - u_int, void (*)(void *, void *, u_int))); + u_int, void (*)(const void *, void *, u_int))); static void reset_d __P((struct bpf_d *)); static int @@ -1000,16 +1000,16 @@ bpf_tap(arg, pkt, pktlen) */ static void bpf_mcopy(src_arg, dst_arg, len) - void *src_arg, *dst_arg; + const void *src_arg; + void *dst_arg; register u_int len; { - register struct mbuf *m; + register const struct mbuf *m; register u_int count; - u_char *src, *dst; + u_char *dst; - src = src_arg; - dst = dst_arg; m = src_arg; + dst = dst_arg; while (len > 0) { if (m == 0) panic("bpf_mcopy"); @@ -1059,7 +1059,7 @@ catchpacket(d, pkt, pktlen, snaplen, cpfn) register struct bpf_d *d; register u_char *pkt; register u_int pktlen, snaplen; - register void (*cpfn)(); + register void (*cpfn)(const void *, void *, u_int); { register struct bpf_hdr *hp; register int totlen, curlen; -- 2.20.1