From 3bf8d2ccbbf75533c3578bfebde1238b7293b3ad Mon Sep 17 00:00:00 2001 From: tron Date: Tue, 15 Nov 2005 11:46:49 +0000 Subject: (svn r3190) Turn some loops into canonical for loop form --- settings_gui.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'settings_gui.c') diff --git a/settings_gui.c b/settings_gui.c index 3f6b520d2..433a7799d 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -1277,13 +1277,10 @@ void ShowNewgrf(void) { // little helper function to calculate _grffile_count // should be REMOVED once _grffile_count is calculated at loading - const GRFFile* c = _first_grffile; + const GRFFile* c; _grffile_count = 0; - while (c != NULL) { - _grffile_count++; - c = c->next; - } + for (c = _first_grffile; c != NULL; c = c->next) _grffile_count++; } w->vscroll.cap = 12; -- cgit v1.2.3-70-g09d2