diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c index 19004aad8..88f2b5bd6 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -8018,8 +8018,7 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c | |||
8018 | #if ENABLE_FEATURE_SH_STANDALONE | 8018 | #if ENABLE_FEATURE_SH_STANDALONE |
8019 | if (applet_no >= 0) { | 8019 | if (applet_no >= 0) { |
8020 | # if NUM_SCRIPTS > 0 | 8020 | # if NUM_SCRIPTS > 0 |
8021 | if (applet_no >= NUM_APPLETS) | 8021 | if (applet_no < NUM_APPLETS) |
8022 | goto run_script; | ||
8023 | # endif | 8022 | # endif |
8024 | if (APPLET_IS_NOEXEC(applet_no)) { | 8023 | if (APPLET_IS_NOEXEC(applet_no)) { |
8025 | clearenv(); | 8024 | clearenv(); |
@@ -8045,9 +8044,6 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c | |||
8045 | #endif | 8044 | #endif |
8046 | 8045 | ||
8047 | if (cmd != bb_busybox_exec_path && errno == ENOEXEC) { | 8046 | if (cmd != bb_busybox_exec_path && errno == ENOEXEC) { |
8048 | #if ENABLE_FEATURE_SH_STANDALONE && NUM_SCRIPTS > 0 | ||
8049 | run_script: | ||
8050 | #endif | ||
8051 | /* Run "cmd" as a shell script: | 8047 | /* Run "cmd" as a shell script: |
8052 | * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html | 8048 | * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html |
8053 | * "If the execve() function fails with ENOEXEC, the shell | 8049 | * "If the execve() function fails with ENOEXEC, the shell |