From nobody Fri Jun 07 15:07:34 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vwl1L3tgnz5Ndym; Fri, 07 Jun 2024 15:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vwl1L3NgQz4gXT; Fri, 7 Jun 2024 15:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717772854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q1K06n1J9Y5uk3VGA8eZSuFKAaor4Vn3uOSGN4/62XY=; b=CZNh1+eG311J1whpq7u6xa2QdCuTKY+tQd7FIzRA0uky87yR8vJBj2iIL/Q0pU06oKHzCW HDrkq537lY8uSOTTadrY6CQYT81hAdXpfP5IiQZ57/eGQ/uMTn9se3/gD4Bc4l6CATLiea /ZEK1xlKJgV1pjySygncE73i66nNQmyPrjqCoEb8ZBL2g+f3DyHBFburQSz2KFywZd9Kxu 8lYUwAZ3e7W3/u7i+m4/4yd9CEOwfWcpM0eXSD0q3kC8mF1V3r5ELeyF2yhzhdT7syTEPa WXHSTstGIfVq8lsmDh43p6D0uWQXkkFtYsi3kWVg/PXuPLyWSl6tJBVGoQGOFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717772854; a=rsa-sha256; cv=none; b=GEM7AoSZri/DVDlJxX393yHlQ4YjpmGaJluRs4aXJPxkgrJFomiiLydrv6D1h+jHKxeywE OOWnJ4/JPCZvEDQpKMEl+Lr8Xgmi4VaG2MO4bFzBQyy7ba9d/vUuKlmkB+J8VNEkbo8cWJ FjSCCKIFNillJnXKojXeNAlZJtytE+hXFL8gQN03wcrjwuCE+XkF22p5ea5M89EUOT3Vur PTwIGmww0Lp7nwTnRYQL5f05weCxnS95aUI/L95V1gNaXiVuc+chBz3HSwQNAIfDMkJJpF FuKkRhk9EkGVC0hRLehROBdnCG7dQs2X05iDxkK0rM4jtDZauJbYcA8ippVO5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717772854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q1K06n1J9Y5uk3VGA8eZSuFKAaor4Vn3uOSGN4/62XY=; b=fcH9NMU94Y9YqcEyTle5B5dttIWgBGgGpLpJYVj+LjG1GONB0P0vUqYBUVM6HWBNfz86mn HX6TzTGrnheQsbfe7nLK7P8Hh+xFqa9MaJi+0PHEhzG2uW5CBQGALVTZZQX1r0sRGD4DAy HoW5QgVJzt4khZJEHwBNkRGfYbdVKjSskPiAnoMcvxX81elZ6bq06M/t04B7718iQ1/igj g6rSmSNjATaA3c0UwyltY71tEHygA1I+yj3V3TK9q3ZsBxrL9M4w2afOdlxAqpFOmG8LGP r9b1JfD6iEzXBaKeiXmnv/ssXH0kuegr361vPgonlYZk8Khwl+1KTru+X7ncHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vwl1L30TwzJrb; Fri, 7 Jun 2024 15:07:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 457F7Yuv003664; Fri, 7 Jun 2024 15:07:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 457F7YHY003661; Fri, 7 Jun 2024 15:07:34 GMT (envelope-from git) Date: Fri, 7 Jun 2024 15:07:34 GMT Message-Id: <202406071507.457F7YHY003661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 89204d9dcbe2 - main - bpf: Prefer the boolean form when calling bpf_peers_present() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89204d9dcbe28558fae65936a0e93f44d926b88f Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=89204d9dcbe28558fae65936a0e93f44d926b88f commit 89204d9dcbe28558fae65936a0e93f44d926b88f Author: Zhenlei Huang AuthorDate: 2024-06-07 15:06:07 +0000 Commit: Zhenlei Huang 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)); } /*