summaryrefslogtreecommitdiff
path: root/Src/loop.c
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2019-12-18 04:00:11 +0000
committerDaniel Shahaf <danielsh@apache.org>2019-12-18 06:01:55 +0000
commita90e93f454c62c7aa5227459a5bbe4ff5eeed78b (patch)
treea4bda3ace75b7eab3d35417d81128606b11ec181 /Src/loop.c
parentae7e291873c1f80c51f53db934a87df2c0eaf821 (diff)
downloadzsh-a90e93f454c62c7aa5227459a5bbe4ff5eeed78b.tar.gz
zsh-a90e93f454c62c7aa5227459a5bbe4ff5eeed78b.zip
45076: internal: Simplify handling of try_tryflag. No functional change.
try_tryflag isn't assigned anywhere, other than at initialization and by these lines, so we don't need to save and restore the value.
Diffstat (limited to 'Src/loop.c')
-rw-r--r--Src/loop.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Src/loop.c b/Src/loop.c
index 3fa7006aa..538afb8dc 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -732,7 +732,7 @@ exectry(Estate state, int do_exec)
Wordcode end, always;
int endval;
int save_retflag, save_breaks, save_contflag;
- zlong save_try_errflag, save_try_tryflag, save_try_interrupt;
+ zlong save_try_errflag, save_try_interrupt;
end = state->pc + WC_TRY_SKIP(state->pc[-1]);
always = state->pc + 1 + WC_TRY_SKIP(*state->pc);
@@ -741,12 +741,9 @@ exectry(Estate state, int do_exec)
cmdpush(CS_CURSH);
/* The :try clause */
- save_try_tryflag = try_tryflag;
- try_tryflag = 1;
-
+ ++try_tryflag;
execlist(state, 1, do_exec);
-
- try_tryflag = save_try_tryflag;
+ --try_tryflag;
/* Don't record errflag here, may be reset. However, */
/* endval should show failure when there is an error. */