Module Name:    src
Committed By:   joerg
Date:           Sat Feb 25 00:13:00 UTC 2012

Modified Files:
        src/dist/nvi/ex: ex_tag.c
        src/dist/nvi/vi: vs_msg.c

Log Message:
Don't use loops with empty body.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/dist/nvi/ex/ex_tag.c
cvs rdiff -u -r1.4 -r1.5 src/dist/nvi/vi/vs_msg.c

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

Modified files:

Index: src/dist/nvi/ex/ex_tag.c
diff -u src/dist/nvi/ex/ex_tag.c:1.10 src/dist/nvi/ex/ex_tag.c:1.11
--- src/dist/nvi/ex/ex_tag.c:1.10	Wed Aug 17 12:56:55 2011
+++ src/dist/nvi/ex/ex_tag.c	Sat Feb 25 00:13:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ex_tag.c,v 1.10 2011/08/17 12:56:55 christos Exp $ */
+/*	$NetBSD: ex_tag.c,v 1.11 2012/02/25 00:13:00 joerg Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -1411,7 +1411,7 @@ ctag_file(SCR *sp, TAGF *tfp, char *name
 #define	GREATER		1
 #define	LESS		(-1)
 
-#define	SKIP_PAST_NEWLINE(p, back)	while (p < back && *p++ != '\n');
+#define	SKIP_PAST_NEWLINE(p, back)	while (p < back && *p++ != '\n') continue;
 
 static char *
 binary_search(register char *string, register char *front, register char *back)

Index: src/dist/nvi/vi/vs_msg.c
diff -u src/dist/nvi/vi/vs_msg.c:1.4 src/dist/nvi/vi/vs_msg.c:1.5
--- src/dist/nvi/vi/vs_msg.c:1.4	Thu May 13 17:52:11 2010
+++ src/dist/nvi/vi/vs_msg.c	Sat Feb 25 00:13:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vs_msg.c,v 1.4 2010/05/13 17:52:11 tnozaki Exp $ */
+/*	$NetBSD: vs_msg.c,v 1.5 2012/02/25 00:13:00 joerg Exp $ */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -897,7 +897,8 @@ vs_msgsave(SCR *sp, mtype_t mt, char *p,
 	if ((mp_c = gp->msgq.lh_first) == NULL) {
 		LIST_INSERT_HEAD(&gp->msgq, mp_n, q);
 	} else {
-		for (; mp_c->q.le_next != NULL; mp_c = mp_c->q.le_next);
+		while (mp_c->q.le_next != NULL)
+			mp_c = mp_c->q.le_next;
 		LIST_INSERT_AFTER(mp_c, mp_n, q);
 	}
 	return;

Reply via email to