aboutsummaryrefslogtreecommitdiff
path: root/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'hush.c')
-rw-r--r--hush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hush.c b/hush.c
index d0b30ebac..abc8f6e60 100644
--- a/hush.c
+++ b/hush.c
@@ -428,7 +428,7 @@ static int builtin_cd(struct child_prog *child)
428 printf("cd: %s: %s\n", newdir, strerror(errno)); 428 printf("cd: %s: %s\n", newdir, strerror(errno));
429 return EXIT_FAILURE; 429 return EXIT_FAILURE;
430 } 430 }
431 getcwd(cwd, sizeof(char)*MAX_LINE); 431 cwd = xgetcwd(cwd);
432 return EXIT_SUCCESS; 432 return EXIT_SUCCESS;
433} 433}
434 434
@@ -567,7 +567,7 @@ static int builtin_jobs(struct child_prog *child)
567/* built-in 'pwd' handler */ 567/* built-in 'pwd' handler */
568static int builtin_pwd(struct child_prog *dummy) 568static int builtin_pwd(struct child_prog *dummy)
569{ 569{
570 getcwd(cwd, MAX_LINE); 570 cwd = xgetcwd(cwd);
571 puts(cwd); 571 puts(cwd);
572 return EXIT_SUCCESS; 572 return EXIT_SUCCESS;
573} 573}