diff options
-rw-r--r-- | shell/ash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index b490b69f1..f8e4e7d45 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9549,7 +9549,7 @@ shiftcmd(int argc ATTRIBUTE_UNUSED, char **argv) | |||
9549 | if (argv[1]) | 9549 | if (argv[1]) |
9550 | n = number(argv[1]); | 9550 | n = number(argv[1]); |
9551 | if (n > shellparam.nparam) | 9551 | if (n > shellparam.nparam) |
9552 | ash_msg_and_raise_error("can't shift that many"); | 9552 | n = shellparam.nparam; |
9553 | INT_OFF; | 9553 | INT_OFF; |
9554 | shellparam.nparam -= n; | 9554 | shellparam.nparam -= n; |
9555 | for (ap1 = shellparam.p; --n >= 0; ap1++) { | 9555 | for (ap1 = shellparam.p; --n >= 0; ap1++) { |
@@ -11994,6 +11994,8 @@ typedef enum __rlimit_resource rlim_t; | |||
11994 | static int | 11994 | static int |
11995 | readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | 11995 | readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) |
11996 | { | 11996 | { |
11997 | static const char *const arg_REPLY[] = { "REPLY", NULL }; | ||
11998 | |||
11997 | char **ap; | 11999 | char **ap; |
11998 | int backslash; | 12000 | int backslash; |
11999 | char c; | 12001 | char c; |
@@ -12086,7 +12088,7 @@ readcmd(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) | |||
12086 | } | 12088 | } |
12087 | ap = argptr; | 12089 | ap = argptr; |
12088 | if (*ap == NULL) | 12090 | if (*ap == NULL) |
12089 | ash_msg_and_raise_error("arg count"); | 12091 | ap = (char**)arg_REPLY; |
12090 | ifs = bltinlookup("IFS"); | 12092 | ifs = bltinlookup("IFS"); |
12091 | if (ifs == NULL) | 12093 | if (ifs == NULL) |
12092 | ifs = defifs; | 12094 | ifs = defifs; |