diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/shell/ash.c b/shell/ash.c index ff2a54fbe..faf861583 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -15542,9 +15542,8 @@ int ash_main(int argc UNUSED_PARAM, char **argv) | |||
15542 | struct jmploc jmploc; | 15542 | struct jmploc jmploc; |
15543 | struct stackmark smark; | 15543 | struct stackmark smark; |
15544 | int login_sh; | 15544 | int login_sh; |
15545 | #if ENABLE_PLATFORM_MINGW32 | ||
15546 | const char *sd; | ||
15547 | 15545 | ||
15546 | #if ENABLE_PLATFORM_MINGW32 | ||
15548 | INIT_G_memstack(); | 15547 | INIT_G_memstack(); |
15549 | 15548 | ||
15550 | /* from init() */ | 15549 | /* from init() */ |
@@ -15660,15 +15659,12 @@ int ash_main(int argc UNUSED_PARAM, char **argv) | |||
15660 | 15659 | ||
15661 | state = 1; | 15660 | state = 1; |
15662 | #if ENABLE_PLATFORM_MINGW32 | 15661 | #if ENABLE_PLATFORM_MINGW32 |
15663 | sd = get_system_drive(); | 15662 | hp = xasprintf("%s/etc/profile", get_system_drive() ?: ""); |
15664 | if (sd) { | 15663 | read_profile(hp); |
15665 | char *path = xasprintf("%s/etc/profile", sd); | 15664 | free((void *)hp); |
15666 | read_profile(path); | 15665 | #else |
15667 | free(path); | ||
15668 | } | ||
15669 | else | ||
15670 | #endif | ||
15671 | read_profile("/etc/profile"); | 15666 | read_profile("/etc/profile"); |
15667 | #endif | ||
15672 | state1: | 15668 | state1: |
15673 | state = 2; | 15669 | state = 2; |
15674 | hp = lookupvar("HOME"); | 15670 | hp = lookupvar("HOME"); |