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.
This commit is contained in:
Warner Losh 2001-03-01 05:49:36 +00:00
parent 55ff3bf4be
commit 470b24b584
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73258

View File

@ -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);