diff options
author | 2003-06-25 15:11:06 +0000 | |
---|---|---|
committer | 2003-06-25 15:11:06 +0000 | |
commit | b97a1f09183ca606a91cd367e9c9be7f1c2d471a (patch) | |
tree | 1a67b66861d25cd915101e38278fc13f0af14686 | |
parent | Function prototypes that take no args should have (void) as the parameter. (diff) | |
download | wireguard-openbsd-b97a1f09183ca606a91cd367e9c9be7f1c2d471a.tar.xz wireguard-openbsd-b97a1f09183ca606a91cd367e9c9be7f1c2d471a.zip |
Use sizeof(nextpathbuf) instead of 2 * MAXPATHLEN; espie@ OK
-rw-r--r-- | usr.bin/make/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c index 4efbef728fb..26a6b7554cd 100644 --- a/usr.bin/make/util.c +++ b/usr.bin/make/util.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: util.c,v 1.20 2003/06/25 13:40:27 espie Exp $ */ +/* $OpenBSD: util.c,v 1.21 2003/06/25 15:11:06 millert Exp $ */ /* $NetBSD: util.c,v 1.10 1996/12/31 17:56:04 christos Exp $ */ /* @@ -264,7 +264,7 @@ getwd(pathname) if (ISDOT(d->d_name) || ISDOTDOT(d->d_name)) continue; (void)strlcpy(cur_name_add, d->d_name, - 2 * MAXPATHLEN - (MAXPATHLEN - 1)); + sizeof(nextpathbuf) MAXPATHLEN - (MAXPATHLEN - 1)); if (lstat(nextpathptr, &st_next) == -1) { (void)snprintf(pathname, MAXPATHLEN, "getwd: Cannot stat \"%s\" (%s)", |