git: 89204d9dcbe2 - main - bpf: Prefer the boolean form when calling bpf_peers_present()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Jun 2024 15:07:34 UTC
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=89204d9dcbe28558fae65936a0e93f44d926b88f commit 89204d9dcbe28558fae65936a0e93f44d926b88f Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-06-07 15:06:07 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-06-07 15:06:07 +0000 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)); } /*