diff options
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_eiface.c | 4 | ||||
-rw-r--r-- | sys/netgraph/ng_ether.c | 4 | ||||
-rw-r--r-- | sys/netgraph/ng_gif.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c index 6f15714c08cb..6a711cab8699 100644 --- a/sys/netgraph/ng_eiface.c +++ b/sys/netgraph/ng_eiface.c @@ -524,12 +524,12 @@ ng_eiface_rcvmsg(node_p node, item_p item, hook_p lasthook) } case NGM_EIFACE_GET_IFNAME: - NG_MKRESPONSE(resp, msg, IFNAMSIZ + 1, M_NOWAIT); + NG_MKRESPONSE(resp, msg, IFNAMSIZ, M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; } - strlcpy(resp->data, ifp->if_xname, IFNAMSIZ + 1); + strlcpy(resp->data, ifp->if_xname, IFNAMSIZ); break; case NGM_EIFACE_GET_IFADDRS: diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c index a3932a19a660..12ab4db9050e 100644 --- a/sys/netgraph/ng_ether.c +++ b/sys/netgraph/ng_ether.c @@ -420,12 +420,12 @@ ng_ether_rcvmsg(node_p node, item_p item, hook_p lasthook) case NGM_ETHER_COOKIE: switch (msg->header.cmd) { case NGM_ETHER_GET_IFNAME: - NG_MKRESPONSE(resp, msg, IFNAMSIZ + 1, M_NOWAIT); + NG_MKRESPONSE(resp, msg, IFNAMSIZ, M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; } - strlcpy(resp->data, priv->ifp->if_xname, IFNAMSIZ + 1); + strlcpy(resp->data, priv->ifp->if_xname, IFNAMSIZ); break; case NGM_ETHER_GET_IFINDEX: NG_MKRESPONSE(resp, msg, sizeof(u_int32_t), M_NOWAIT); diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c index 605c7f208d29..631d0586e055 100644 --- a/sys/netgraph/ng_gif.c +++ b/sys/netgraph/ng_gif.c @@ -406,12 +406,12 @@ ng_gif_rcvmsg(node_p node, item_p item, hook_p lasthook) case NGM_GIF_COOKIE: switch (msg->header.cmd) { case NGM_GIF_GET_IFNAME: - NG_MKRESPONSE(resp, msg, IFNAMSIZ + 1, M_NOWAIT); + NG_MKRESPONSE(resp, msg, IFNAMSIZ, M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; } - strlcpy(resp->data, priv->ifp->if_xname, IFNAMSIZ + 1); + strlcpy(resp->data, priv->ifp->if_xname, IFNAMSIZ); break; case NGM_GIF_GET_IFINDEX: NG_MKRESPONSE(resp, msg, sizeof(u_int32_t), M_NOWAIT); |