summaryrefslogtreecommitdiff
path: root/src/ini.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2011-02-25 22:04:38 +0000
committeralberth <alberth@openttd.org>2011-02-25 22:04:38 +0000
commit31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea (patch)
tree793449a253b91916b65c373f54b4544a8c6c86b8 /src/ini.cpp
parent1dbc0a20bed5cd85035b4f84a649c4f7386b07ab (diff)
downloadopenttd-31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea.tar.xz
(svn r22145) -Codechange: Do explicit test for non-bool values.
Diffstat (limited to 'src/ini.cpp')
-rw-r--r--src/ini.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ini.cpp b/src/ini.cpp
index dc658296e..35d8910c8 100644
--- a/src/ini.cpp
+++ b/src/ini.cpp
@@ -268,11 +268,11 @@ void IniFile::LoadFromDisk(const char *filename)
}
s++; // skip [
group = new IniGroup(this, s, e - s);
- if (comment_size) {
+ if (comment_size != 0) {
group->comment = strndup(comment, comment_size);
comment_size = 0;
}
- } else if (group) {
+ } else if (group != NULL) {
char *t;
/* find end of keyname */
if (*s == '\"') {
@@ -285,7 +285,7 @@ void IniFile::LoadFromDisk(const char *filename)
/* it's an item in an existing group */
IniItem *item = new IniItem(group, s, t - s);
- if (comment_size) {
+ if (comment_size != 0) {
item->comment = strndup(comment, comment_size);
comment_size = 0;
}