diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-09 22:48:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-09 22:48:12 +0000 |
commit | e5dfced23a904d08afa5dcee190c3c3d845d9f50 (patch) | |
tree | ef367ee8a9096884fb40debdc9e10af8583f9d5f /coreutils/pwd.c | |
parent | a75e2867435faa68ea03735fe09ad298fa3e4e72 (diff) | |
download | busybox-w32-e5dfced23a904d08afa5dcee190c3c3d845d9f50.tar.gz busybox-w32-e5dfced23a904d08afa5dcee190c3c3d845d9f50.tar.bz2 busybox-w32-e5dfced23a904d08afa5dcee190c3c3d845d9f50.zip |
Apply Vladimir's latest cleanup patch.
-Erik
Diffstat (limited to 'coreutils/pwd.c')
-rw-r--r-- | coreutils/pwd.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 2f36b1f05..f6a00bf1e 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
@@ -32,11 +32,13 @@ | |||
32 | 32 | ||
33 | extern int pwd_main(int argc, char **argv) | 33 | extern int pwd_main(int argc, char **argv) |
34 | { | 34 | { |
35 | char buf[BUFSIZ + 1]; | 35 | static char *buf; |
36 | 36 | ||
37 | if (getcwd(buf, sizeof(buf)) == NULL) | 37 | buf = xgetcwd(buf); |
38 | perror_msg_and_die("getcwd"); | 38 | |
39 | 39 | if (buf != NULL) { | |
40 | puts(buf); | 40 | puts(buf); |
41 | return EXIT_SUCCESS; | 41 | return EXIT_SUCCESS; |
42 | } | ||
43 | return EXIT_FAILURE; | ||
42 | } | 44 | } |