Date: Thu, 13 Mar 2025 10:14:24 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e72e35500eb2 - stable/14 - bpf: Use static initializers Message-ID: <202503131014.52DAEO8G091805@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e72e35500eb20c2e93b13cd96f24844cb8190a9e commit e72e35500eb20c2e93b13cd96f24844cb8190a9e Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2025-03-06 04:51:43 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2025-03-13 10:13:50 +0000 bpf: Use static initializers MFC after: 1 week (cherry picked from commit c7f8ffc70afa00ae863fe9f122c5a7eb7b56f4f5) --- 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 e8c9aa7ce4f3..de56f3db782f 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -184,7 +184,7 @@ struct bpf_dltlist32 { * frames, ethernet frames, etc). */ CK_LIST_HEAD(bpf_iflist, bpf_if); -static struct bpf_iflist bpf_iflist; +static struct bpf_iflist bpf_iflist = CK_LIST_HEAD_INITIALIZER(); static struct sx bpf_sx; /* bpf global lock */ static int bpf_bpfd_cnt; @@ -3008,8 +3008,6 @@ bpf_drvinit(void *unused) struct cdev *dev; sx_init(&bpf_sx, "bpf global lock"); - CK_LIST_INIT(&bpf_iflist); - dev = make_dev(&bpf_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "bpf"); /* For compatibility */ make_dev_alias(dev, "bpf0");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202503131014.52DAEO8G091805>