diff options
author | Johan Karlsson <johan@FreeBSD.org> | 2002-12-18 11:50:28 +0000 |
---|---|---|
committer | Johan Karlsson <johan@FreeBSD.org> | 2002-12-18 11:50:28 +0000 |
commit | 894fd2da788ecf13e14176f20d2781f4375f0b71 (patch) | |
tree | 324453cf4384169c22b8a522a526f61d38e4b1ff /bin/realpath | |
parent | 19fc74fb60b2ccd4f1c64f561cde5d0c9835e457 (diff) | |
download | src-test2-894fd2da788ecf13e14176f20d2781f4375f0b71.tar.gz src-test2-894fd2da788ecf13e14176f20d2781f4375f0b71.zip |
Notes
Diffstat (limited to 'bin/realpath')
-rw-r--r-- | bin/realpath/realpath.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/realpath/realpath.c b/bin/realpath/realpath.c index c526733e9000..8b7177f7dc48 100644 --- a/bin/realpath/realpath.c +++ b/bin/realpath/realpath.c @@ -49,10 +49,7 @@ main(int argc, char *argv[]) char buf[MAXPATHLEN]; char *p; - if (argc == 1) { - if ((p = getcwd(NULL, 0)) == NULL) - err(1, "getcwd()"); - } else if (argc == 2) { + if (argc == 2) { if ((p = realpath(argv[1], buf)) == NULL) err(1, "%s", buf); } else @@ -65,6 +62,6 @@ static void usage(void) { - (void)fprintf(stderr, "usage: realpath [path]\n"); + (void)fprintf(stderr, "usage: realpath path\n"); exit(1); } |