summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-25 17:04:09 +0000
committerrubidium <rubidium@openttd.org>2008-05-25 17:04:09 +0000
commitc5e38037f0df8fd67e8fb1d2c5e69f9a10e11603 (patch)
treec53f42c03e51ef14a2e9ae185f5240cda14dca06 /src
parent449a03be4b729d4a3cd7cfb228ec34b19c9f349b (diff)
downloadopenttd-c5e38037f0df8fd67e8fb1d2c5e69f9a10e11603.tar.xz
(svn r13247) -Codechange: small amount of coding style for settings.cpp.
Diffstat (limited to 'src')
-rw-r--r--src/settings.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index ee9a4c8e8..46e187ea2 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -331,9 +331,11 @@ static IniGroup *ini_getgroup(IniFile *ini, const char *name, size_t len = 0)
if (len == 0) len = strlen(name);
/* does it exist already? */
- for (group = ini->group; group; group = group->next)
- if (!memcmp(group->name, name, len) && group->name[len] == 0)
+ for (group = ini->group; group != NULL; group = group->next) {
+ if (!memcmp(group->name, name, len) && group->name[len] == 0) {
return group;
+ }
+ }
/* otherwise make a new one */
group = ini_group_alloc(ini, name, len);
@@ -347,8 +349,9 @@ static IniItem *ini_getitem(IniGroup *group, const char *name, bool create)
IniItem *item;
size_t len = strlen(name);
- for (item = group->item; item; item = item->next)
+ for (item = group->item; item != NULL; item = item->next) {
if (strcmp(item->name, name) == 0) return item;
+ }
if (!create) return NULL;