diff options
author | rik <rik@FreeBSD.org> | 2004-12-23 18:39:13 +0000 |
---|---|---|
committer | rik <rik@FreeBSD.org> | 2004-12-23 18:39:13 +0000 |
commit | 508621c9dff408419f8be1efb924bef63e98aca4 (patch) | |
tree | aef954d84f60caf22e7f9faf8ae16bff9abd56d8 /sys/netgraph/ng_sample.c | |
parent | 86667209029d430a87a52dda2ae2d77b94665411 (diff) | |
download | FreeBSD-src-508621c9dff408419f8be1efb924bef63e98aca4.zip FreeBSD-src-508621c9dff408419f8be1efb924bef63e98aca4.tar.gz |
Fix counting length of leadin for hook name (sizeof () => strlen ()).
Approved by: julian
MFC after: 3 days
Diffstat (limited to 'sys/netgraph/ng_sample.c')
-rw-r--r-- | sys/netgraph/ng_sample.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c index 4bb4684..93eb736 100644 --- a/sys/netgraph/ng_sample.c +++ b/sys/netgraph/ng_sample.c @@ -203,7 +203,7 @@ ng_xxx_newhook(node_p node, hook_p hook, const char *name) NG_XXX_HOOK_DLCI_LEADIN, strlen(NG_XXX_HOOK_DLCI_LEADIN)) == 0) { char *eptr; - cp = name + sizeof(NG_XXX_HOOK_DLCI_LEADIN); + cp = name + strlen(NG_XXX_HOOK_DLCI_LEADIN); if (!isdigit(*cp) || (cp[0] == '0' && cp[1] != '\0')) return (EINVAL); dlci = (int)strtoul(cp, &eptr, 10); |