Skip to content

Commit

Permalink
Don't use PATH_MAX.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Mar 19, 2020
1 parent d48f8f5 commit 1c533a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filename.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,9 @@ lrealpath(path)
char *path;
{
#if HAVE_REALPATH
char rpath[PATH_MAX];
if (realpath(path, rpath) != NULL)
return (save(rpath));
char *rpath = realpath(path, NULL);
if (rpath != NULL)
return (rpath);
#endif
return (save(path));
}
Expand Down

0 comments on commit 1c533a6

Please sign in to comment.