summaryrefslogtreecommitdiff
path: root/settings_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'settings_gui.c')
-rw-r--r--settings_gui.c7
1 files changed, 2 insertions, 5 deletions
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;