Module Name: src Committed By: christos Date: Mon Nov 15 21:24:32 UTC 2010
Modified Files: src/lib/libedit: filecomplete.c Log Message: don't increment i twice in the loop. From Michael Byrnes To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libedit/filecomplete.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/filecomplete.c diff -u src/lib/libedit/filecomplete.c:1.19 src/lib/libedit/filecomplete.c:1.20 --- src/lib/libedit/filecomplete.c:1.19 Tue Jun 1 14:20:26 2010 +++ src/lib/libedit/filecomplete.c Mon Nov 15 16:24:31 2010 @@ -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 ? " " : ""); }