(svn r22145) -Codechange: Do explicit test for non-bool values.

This commit is contained in:
alberth
2011-02-25 22:04:38 +00:00
parent 1dbc0a20be
commit 31386c42a7
14 changed files with 31 additions and 31 deletions

View File

@@ -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;
}