Skip to content

Commit

Permalink
Revert 1c533a6.
Browse files Browse the repository at this point in the history
Not all implementations of realpath() support a NULL second parameter.
  • Loading branch information
gwsw committed Jun 14, 2020
1 parent 1dce2e1 commit 4b65417
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions filename.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,16 +788,16 @@ lglob(filename)
}

/*
* @@@
* Return canonical pathname.
*/
public char *
lrealpath(path)
char *path;
{
#if HAVE_REALPATH
char *rpath = realpath(path, NULL);
if (rpath != NULL)
return (rpath);
char rpath[PATH_MAX];
if (realpath(path, rpath) != NULL)
return (save(rpath));
#endif
return (save(path));
}
Expand Down

0 comments on commit 4b65417

Please sign in to comment.