summaryrefslogtreecommitdiffstats
path: root/bin/realpath/realpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/realpath/realpath.c')
-rw-r--r--bin/realpath/realpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/realpath/realpath.c b/bin/realpath/realpath.c
index 57cbb97..c526733 100644
--- a/bin/realpath/realpath.c
+++ b/bin/realpath/realpath.c
@@ -46,7 +46,7 @@ static void usage(void) __dead2;
int
main(int argc, char *argv[])
{
- char buf[PATH_MAX];
+ char buf[MAXPATHLEN];
char *p;
if (argc == 1) {
@@ -54,7 +54,7 @@ main(int argc, char *argv[])
err(1, "getcwd()");
} else if (argc == 2) {
if ((p = realpath(argv[1], buf)) == NULL)
- err(1, "%s", argv[1]);
+ err(1, "%s", buf);
} else
usage();
(void)printf("%s\n", p);
OpenPOWER on IntegriCloud