Module Name:    src
Committed By:   kre
Date:           Tue May 10 15:14:30 UTC 2016

Modified Files:
        src/bin/sh: eval.c

Log Message:
PR bin/48875 - minor correction (well, not so minor) - commands in loops
must be assumed to have something following, even if the loop itself doesn't,
so redirected fd's around func calls need to be saved.   Should fix etcupdate


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/bin/sh/eval.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.125 src/bin/sh/eval.c:1.126
--- src/bin/sh/eval.c:1.125	Mon May  9 21:03:10 2016
+++ src/bin/sh/eval.c	Tue May 10 15:14:30 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.125 2016/05/09 21:03:10 kre Exp $	*/
+/*	$NetBSD: eval.c,v 1.126 2016/05/10 15:14:30 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.125 2016/05/09 21:03:10 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.126 2016/05/10 15:14:30 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -380,7 +380,7 @@ skipping:	  if (evalskip == SKIPCONT && 
 			if (exitstatus == 0)
 				break;
 		}
-		evaltree(n->nbinary.ch2, flags & (EV_TESTED | EV_MORE));
+		evaltree(n->nbinary.ch2, (flags & EV_TESTED) | EV_MORE);
 		status = exitstatus;
 		if (evalskip)
 			goto skipping;

Reply via email to