From 89204d9dcbe28558fae65936a0e93f44d926b88f Mon Sep 17 00:00:00 2001 From: Zhenlei Huang Date: Fri, 7 Jun 2024 23:06:07 +0800 Subject: [PATCH] bpf: Prefer the boolean form when calling bpf_peers_present() No functional change intended. Reviewed by: markj, kp, #network MFC with: 8f31b879ecaf Differential Revision: https://reviews.freebsd.org/D45509 --- sys/net/bpf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 1078c57dfee2..7983337064be 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2880,9 +2880,7 @@ bpfdetach(struct ifnet *ifp) 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)); } /*