Module Name:    src
Committed By:   christos
Date:           Wed Mar  2 19:11:28 UTC 2016

Modified Files:
        src/bin/ed: main.c

Log Message:
PR/50879: David Binderman: remove redundant code.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/bin/ed/main.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/ed/main.c
diff -u src/bin/ed/main.c:1.27 src/bin/ed/main.c:1.28
--- src/bin/ed/main.c:1.27	Mon Mar 31 08:55:46 2014
+++ src/bin/ed/main.c	Wed Mar  2 14:11:28 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.27 2014/03/31 12:55:46 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.28 2016/03/02 19:11:28 christos Exp $	*/
 
 /* main.c: This file contains the main control and user-interface routines
    for the ed line editor. */
@@ -39,7 +39,7 @@ __COPYRIGHT(
 #if 0
 static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.27 2014/03/31 12:55:46 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.28 2016/03/02 19:11:28 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -223,11 +223,14 @@ top:
 		}
 		isglobal = 0;
 		if ((status = extract_addr_range()) >= 0 &&
-		    (status = exec_command()) >= 0)
-			if (!status || (status &&
-			    (status = display_lines(current_addr, current_addr,
-			        status)) >= 0))
+		    (status = exec_command()) >= 0) {
+			if (status == 0)
 				continue;
+			status = display_lines(current_addr, current_addr,
+			    status);
+			if (status >= 0)
+				continue;
+		}
 		switch (status) {
 		case EOF:
 			quit(0);

Reply via email to