Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit don't increment i twice in the loop. From Michae...



details:   https://anonhg.NetBSD.org/src/rev/66347ede8b4d
branches:  trunk
changeset: 758792:66347ede8b4d
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Nov 15 21:24:31 2010 +0000

description:
don't increment i twice in the loop. From Michael Byrnes

diffstat:

 lib/libedit/filecomplete.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 904e2028da6b -r 66347ede8b4d lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Mon Nov 15 21:19:59 2010 +0000
+++ b/lib/libedit/filecomplete.c        Mon Nov 15 21:24:31 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filecomplete.c,v 1.19 2010/06/01 18:20:26 christos Exp $       */
+/*     $NetBSD: filecomplete.c,v 1.20 2010/11/15 21:24:31 christos Exp $       */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.19 2010/06/01 18:20:26 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.20 2010/11/15 21:24:31 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -368,7 +368,7 @@
        for(; count > 0; count--) {
                int more = limit > 0 && matches[0];
                for(i = 0; more; i++, idx++) {
-                       more = ++i < limit && matches[idx + 1];
+                       more = i < limit && matches[idx + 1];
                        (void)fprintf(el->el_outfile, "%-*s%s", (int)max,
                            matches[idx], more ? " " : "");
                }



Home | Main Index | Thread Index | Old Index