diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-09-14 12:52:31 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-09-14 12:52:31 +0000 |
commit | 3b6b4982b9a61cb84888e8eba7200637fc3b3c12 (patch) | |
tree | 4e04959cf8866fc434b38ab83f2382a59dd52b1e /Src | |
parent | 96475664d9d1425ec94c200115dff1904079e463 (diff) | |
download | zsh-3b6b4982b9a61cb84888e8eba7200637fc3b3c12.tar.gz zsh-3b6b4982b9a61cb84888e8eba7200637fc3b3c12.tar.xz zsh-3b6b4982b9a61cb84888e8eba7200637fc3b3c12.zip |
28258: fix undefined variable in traps
Diffstat (limited to 'Src')
-rw-r--r-- | Src/signals.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Src/signals.c b/Src/signals.c index d107b46d1..456a85300 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -951,7 +951,7 @@ endtrapscope(void) { LinkNode ln; struct savetrap *st; - int exittr; + int exittr = 0; void *exitfn = NULL; /* @@ -959,9 +959,8 @@ endtrapscope(void) * after all the other traps have been put back. * Don't do this inside another trap. */ - if (intrap) - exittr = 0; - else if (!isset(POSIXTRAPS) && (exittr = sigtrapped[SIGEXIT])) { + if (!intrap && + !isset(POSIXTRAPS) && (exittr = sigtrapped[SIGEXIT])) { if (exittr & ZSIG_FUNC) { exitfn = removehashnode(shfunctab, "TRAPEXIT"); } else { |