about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-10-03 22:11:09 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-10-03 22:11:09 -0700
commitcb26e11c70f95c72e300e1f4f16b33e4e5f54d21 (patch)
tree96a618762650ca2675459d40a67150ac7a31d006 /Src
parentb581c3fece76c87ed86ae9fc704d0fcf208a79d3 (diff)
downloadzsh-cb26e11c70f95c72e300e1f4f16b33e4e5f54d21.tar.gz
zsh-cb26e11c70f95c72e300e1f4f16b33e4e5f54d21.tar.xz
zsh-cb26e11c70f95c72e300e1f4f16b33e4e5f54d21.zip
unposted: back out 36707, add test case for 36766
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c2
-rw-r--r--Src/loop.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 235faf3ba..bcc8065a2 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1409,7 +1409,7 @@ sublist_done:
 			exit(lastval);
 		}
 		if (errreturn) {
-		    retflag = 2;
+		    retflag = 1;
 		    breaks = loops;
 		}
 	    }
diff --git a/Src/loop.c b/Src/loop.c
index 7d1528efe..4def9b652 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -552,12 +552,8 @@ execif(Estate state, int do_exec)
 	    run = 1;
 	    break;
 	}
-	if (retflag) {
-	    if (retflag == 2)
-		retflag = 0; /* Never ERR_RETURN here */
-	    else
-		break;
-	}
+	if (retflag)
+	    break;
 	s = 1;
 	state->pc = next;
     }