From 3055dc3e484f726cebd855aa0610e6b9383b6b87 Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Thu, 31 Oct 2013 20:03:59 +0000 Subject: [PATCH] Integrate github revision 0446821e49224c6a29be28760cc9c4cc14f56d8a as suggested by upstream https://github.com/the-tcpdump-group/libpcap/issues/327 Quiesce assignment warnings by use of const --- contrib/libpcap/bpf/net/bpf_filter.c | 4 ++-- contrib/libpcap/bpf_dump.c | 2 +- contrib/libpcap/bpf_image.c | 2 +- contrib/libpcap/pcap/bpf.h | 2 +- contrib/libpcap/pcap/pcap.h | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/libpcap/bpf/net/bpf_filter.c b/contrib/libpcap/bpf/net/bpf_filter.c index be0662e2ee30..0c4fb006165f 100644 --- a/contrib/libpcap/bpf/net/bpf_filter.c +++ b/contrib/libpcap/bpf/net/bpf_filter.c @@ -209,8 +209,8 @@ m_xhalf(m, k, err) */ u_int bpf_filter(pc, p, wirelen, buflen) - register struct bpf_insn *pc; - register u_char *p; + register const struct bpf_insn *pc; + register const u_char *p; u_int wirelen; register u_int buflen; { diff --git a/contrib/libpcap/bpf_dump.c b/contrib/libpcap/bpf_dump.c index 38f88db730b4..e4ff4a239238 100644 --- a/contrib/libpcap/bpf_dump.c +++ b/contrib/libpcap/bpf_dump.c @@ -31,7 +31,7 @@ static const char rcsid[] _U_ = #include void -bpf_dump(struct bpf_program *p, int option) +bpf_dump(const struct bpf_program *p, int option) { const struct bpf_insn *insn; int i; diff --git a/contrib/libpcap/bpf_image.c b/contrib/libpcap/bpf_image.c index 3c801216ab6d..e6c0f626174b 100644 --- a/contrib/libpcap/bpf_image.c +++ b/contrib/libpcap/bpf_image.c @@ -53,7 +53,7 @@ static const char rcsid[] _U_ = char * bpf_image(p, n) - struct bpf_insn *p; + const struct bpf_insn *p; int n; { int v; diff --git a/contrib/libpcap/pcap/bpf.h b/contrib/libpcap/pcap/bpf.h index 23f85c78e28c..8576bbdbd02c 100644 --- a/contrib/libpcap/pcap/bpf.h +++ b/contrib/libpcap/pcap/bpf.h @@ -1285,7 +1285,7 @@ struct bpf_insn { #if __STDC__ || defined(__cplusplus) extern int bpf_validate(const struct bpf_insn *, int); -extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); +extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); #else extern int bpf_validate(); extern u_int bpf_filter(); diff --git a/contrib/libpcap/pcap/pcap.h b/contrib/libpcap/pcap/pcap.h index 6248e9f72562..72f0d28c8e2b 100644 --- a/contrib/libpcap/pcap/pcap.h +++ b/contrib/libpcap/pcap/pcap.h @@ -409,11 +409,11 @@ const char *pcap_lib_version(void); * declared when we build pcap-bpf.c. */ #ifndef __NetBSD__ -u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); +u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); #endif int bpf_validate(const struct bpf_insn *f, int len); -char *bpf_image(struct bpf_insn *, int); -void bpf_dump(struct bpf_program *, int); +char *bpf_image(const struct bpf_insn *, int); +void bpf_dump(const struct bpf_program *, int); #if defined(WIN32)