diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-06-01 19:27:08 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-06-01 19:27:08 +0000 |
commit | 2bf0f791cfe65fb68435ec89cb0e4dc157b9ef5a (patch) | |
tree | 331f4d336a0a1c69c99b51bc506642d9424af2f2 /sbin | |
parent | 77748d9023b20dc1699c563c024514c66c663b88 (diff) |
do not use strlen after strlcpy
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/sysctl/sysctl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index ac77461bd9a..d951da64fbe 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.63 2001/05/14 07:14:53 angelos Exp $ */ +/* $OpenBSD: sysctl.c,v 1.64 2001/06/01 19:27:07 mickey Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95"; #else -static char *rcsid = "$OpenBSD: sysctl.c,v 1.63 2001/05/14 07:14:53 angelos Exp $"; +static char *rcsid = "$OpenBSD: sysctl.c,v 1.64 2001/06/01 19:27:07 mickey Exp $"; #endif #endif /* not lint */ @@ -259,8 +259,7 @@ listall(prefix, lp) if (lp->list == NULL) return; - (void)strlcpy(name, prefix, BUFSIZ); - cp = &name[strlen(name)]; + cp = name + strlcpy(name, prefix, BUFSIZ); *cp++ = '.'; for (lvl2 = 0; lvl2 < lp->size; lvl2++) { if (lp->list[lvl2].ctl_name == NULL) |