aboutsummaryrefslogtreecommitdiff
path: root/coreutils/pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/pwd.c')
-rw-r--r--coreutils/pwd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index b4599b4f3..d96f6a8e5 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -16,7 +16,8 @@ int pwd_main(int argc, char **argv)
{
char *buf;
- if ((buf = xgetcwd(NULL)) != NULL) {
+ buf = xrealloc_getcwd_or_warn(NULL);
+ if (buf != NULL) {
puts(buf);
fflush_stdout_and_exit(EXIT_SUCCESS);
}