diff --git a/sys/net/bpf.h b/sys/net/bpf.h --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -433,15 +433,13 @@ void bpfilterattach(int); u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); -static __inline int +static __inline bool bpf_peers_present(struct bpf_if *bpf) { struct bpf_if_ext *ext; ext = (struct bpf_if_ext *)bpf; - if (!CK_LIST_EMPTY(&ext->bif_dlist)) - return (1); - return (0); + return (!CK_LIST_EMPTY(&ext->bif_dlist)); } #define BPF_TAP(_ifp,_pkt,_pktlen) \ diff --git a/sys/net/bpf.c b/sys/net/bpf.c --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2880,9 +2880,7 @@ bool bpf_peers_present_if(struct ifnet *ifp) { - struct bpf_if *bp = ifp->if_bpf; - - return (bpf_peers_present(bp) > 0); + return (bpf_peers_present(ifp->if_bpf)); } /*