diff options
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/atm/ng_atm.c | 2 | ||||
-rw-r--r-- | sys/netgraph/ng_gif_demux.c | 2 | ||||
-rw-r--r-- | sys/netgraph/ng_iface.c | 2 | ||||
-rw-r--r-- | sys/netgraph/ng_socket.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/atm/ng_atm.c b/sys/netgraph/atm/ng_atm.c index ef168ac..c0a7032 100644 --- a/sys/netgraph/atm/ng_atm.c +++ b/sys/netgraph/atm/ng_atm.c @@ -872,7 +872,7 @@ text_status(node_p node, char *arg, u_int len) sbuf_new(&sbuf, arg, len, SBUF_FIXEDLEN); sbuf_printf(&sbuf, "interface: %s\n", priv->ifp->if_xname); - if (mib->device >= sizeof(devices) / sizeof(devices[0])) + if (mib->device >= nitems(devices)) sbuf_printf(&sbuf, "device=unknown\nvendor=unknown\n"); else sbuf_printf(&sbuf, "device=%s\nvendor=%s\n", diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c index ce0fba0..0a0644e 100644 --- a/sys/netgraph/ng_gif_demux.c +++ b/sys/netgraph/ng_gif_demux.c @@ -111,7 +111,7 @@ const static struct iffam gFamilies[] = { { AF_ATM, NG_GIF_DEMUX_HOOK_ATM }, { AF_NATM, NG_GIF_DEMUX_HOOK_NATM }, }; -#define NUM_FAMILIES (sizeof(gFamilies) / sizeof(*gFamilies)) +#define NUM_FAMILIES nitems(gFamilies) /* Per-node private data */ struct ng_gif_demux_private { diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index 7bbc1da..6bd55c7 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -104,7 +104,7 @@ const static struct iffam gFamilies[] = { { AF_ATM, NG_IFACE_HOOK_ATM }, { AF_NATM, NG_IFACE_HOOK_NATM }, }; -#define NUM_FAMILIES (sizeof(gFamilies) / sizeof(*gFamilies)) +#define NUM_FAMILIES nitems(gFamilies) /* Node private data */ struct ng_iface_private { diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 76d6383..08ee763 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -1163,7 +1163,7 @@ struct domain ngdomain = { .dom_family = AF_NETGRAPH, .dom_name = "netgraph", .dom_protosw = ngsw, - .dom_protoswNPROTOSW = &ngsw[sizeof(ngsw) / sizeof(ngsw[0])] + .dom_protoswNPROTOSW = &ngsw[nitems(ngsw)] }; /* |