Alexandre Julliard : wineconsole: Avoid an empty for loop.

Alexandre Julliard julliard at winehq.org
Mon Oct 21 14:58:25 CDT 2013


Module: wine
Branch: master
Commit: ded5ad8a8ce3acfc85d6c4da834013b333acf986
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ded5ad8a8ce3acfc85d6c4da834013b333acf986

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Oct 21 20:23:39 2013 +0200

wineconsole: Avoid an empty for loop.

---

 programs/wineconsole/dialog.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index d69432e..8ca6563 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -369,12 +369,13 @@ static int CALLBACK font_enum_size(const LOGFONTW* lf, const TEXTMETRICW* tm,
 
     if (WCUSER_ValidateFontMetric(di->data, tm, FontType))
     {
-	int	idx;
+	int	idx = 0;
 
 	/* we want the string to be sorted with a numeric order, not a lexicographic...
 	 * do the job by hand... get where to insert the new string
 	 */
-	for (idx = 0; idx < di->nFont && tm->tmHeight > di->font[idx].height; idx++);
+	while (idx < di->nFont && tm->tmHeight > di->font[idx].height)
+            idx++;
         while (idx < di->nFont &&
                tm->tmHeight == di->font[idx].height &&
                tm->tmWeight > di->font[idx].weight)




More information about the wine-cvs mailing list