diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 07aa2da2e..58da0a2a0 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2770,7 +2770,7 @@ updatepwd(const char *dir) | |||
2770 | lim++; | 2770 | lim++; |
2771 | } | 2771 | } |
2772 | } | 2772 | } |
2773 | p = strtok(cdcomppath, "/"); | 2773 | p = strtok_r(cdcomppath, "/", &cdcomppath); |
2774 | while (p) { | 2774 | while (p) { |
2775 | switch (*p) { | 2775 | switch (*p) { |
2776 | case '.': | 2776 | case '.': |
@@ -2789,7 +2789,7 @@ updatepwd(const char *dir) | |||
2789 | new = stack_putstr(p, new); | 2789 | new = stack_putstr(p, new); |
2790 | USTPUTC('/', new); | 2790 | USTPUTC('/', new); |
2791 | } | 2791 | } |
2792 | p = strtok(NULL, "/"); | 2792 | p = strtok_r(NULL, "/", &cdcomppath); |
2793 | } | 2793 | } |
2794 | if (new > lim) | 2794 | if (new > lim) |
2795 | STUNPUTC(new); | 2795 | STUNPUTC(new); |