summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-03-01 05:49:36 +0000
committerimp <imp@FreeBSD.org>2001-03-01 05:49:36 +0000
commit2f28911795e41e15b20cfa2b3ceac4267e0efe4b (patch)
tree630aec337900c12f04d384598a5c1865be5a86c7 /usr.bin/find
parent40f6e5b06d9a92e716eb09b76d6d2c8a9f7a579d (diff)
downloadFreeBSD-src-2f28911795e41e15b20cfa2b3ceac4267e0efe4b.zip
FreeBSD-src-2f28911795e41e15b20cfa2b3ceac4267e0efe4b.tar.gz
MAXPATHLEN already accounts for the trailing NUL, so no need to add one in.
In addition, since we pass readlink MAXPATHLEN - 1, we would have never have used that extra byte anyway.
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/ls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/find/ls.c b/usr.bin/find/ls.c
index 2335111..df88170 100644
--- a/usr.bin/find/ls.c
+++ b/usr.bin/find/ls.c
@@ -110,7 +110,7 @@ printlink(name)
char *name;
{
int lnklen;
- char path[MAXPATHLEN + 1];
+ char path[MAXPATHLEN];
if ((lnklen = readlink(name, path, MAXPATHLEN - 1)) == -1) {
warn("%s", name);
OpenPOWER on IntegriCloud