diff options
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index a1b211ae0..9fd1b55e2 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -8348,7 +8348,6 @@ defun(char *name, union node *func) | |||
8348 | #define SKIPBREAK (1 << 0) | 8348 | #define SKIPBREAK (1 << 0) |
8349 | #define SKIPCONT (1 << 1) | 8349 | #define SKIPCONT (1 << 1) |
8350 | #define SKIPFUNC (1 << 2) | 8350 | #define SKIPFUNC (1 << 2) |
8351 | #define SKIPFILE (1 << 3) | ||
8352 | #define SKIPEVAL (1 << 4) | 8351 | #define SKIPEVAL (1 << 4) |
8353 | static smallint evalskip; /* set to SKIPxxx if we are skipping commands */ | 8352 | static smallint evalskip; /* set to SKIPxxx if we are skipping commands */ |
8354 | static int skipcount; /* number of levels to skip */ | 8353 | static int skipcount; /* number of levels to skip */ |
@@ -9148,7 +9147,7 @@ returncmd(int argc UNUSED_PARAM, char **argv) | |||
9148 | * If called outside a function, do what ksh does; | 9147 | * If called outside a function, do what ksh does; |
9149 | * skip the rest of the file. | 9148 | * skip the rest of the file. |
9150 | */ | 9149 | */ |
9151 | evalskip = funcnest ? SKIPFUNC : SKIPFILE; | 9150 | evalskip = SKIPFUNC; |
9152 | return argv[1] ? number(argv[1]) : exitstatus; | 9151 | return argv[1] ? number(argv[1]) : exitstatus; |
9153 | } | 9152 | } |
9154 | 9153 | ||
@@ -12330,7 +12329,7 @@ cmdloop(int top) | |||
12330 | skip = evalskip; | 12329 | skip = evalskip; |
12331 | 12330 | ||
12332 | if (skip) { | 12331 | if (skip) { |
12333 | evalskip = 0; | 12332 | evalskip &= ~SKIPFUNC; |
12334 | return skip & SKIPEVAL; | 12333 | return skip & SKIPEVAL; |
12335 | } | 12334 | } |
12336 | } | 12335 | } |