mirror of
https://github.com/opnsense/src.git
synced 2026-02-04 03:00:53 -06:00
bpf: Use static initializers
MFC after: 1 week (cherry picked from commit c7f8ffc70afa00ae863fe9f122c5a7eb7b56f4f5)
This commit is contained in:
parent
9e57b6b4f5
commit
19b6924cdc
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user