summaryrefslogtreecommitdiff
path: root/src/strgen
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/strgen
parent1dbc0a20bed5cd85035b4f84a649c4f7386b07ab (diff)
downloadopenttd-31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea.tar.xz
(svn r22145) -Codechange: Do explicit test for non-bool values.
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index a299eeea5..d3b86c4ec 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -724,7 +724,7 @@ static void HandleString(char *str, bool master)
/* Check if the string has a case..
* The syntax for cases is IDENTNAME.case */
char *casep = strchr(str, '.');
- if (casep) *casep++ = '\0';
+ if (casep != NULL) *casep++ = '\0';
/* Check if this string already exists.. */
LangString *ent = HashFind(str);
@@ -901,7 +901,7 @@ bool CompareFiles(const char *n1, const char *n2)
fclose(f1);
return false;
}
- } while (l1);
+ } while (l1 != 0);
fclose(f2);
fclose(f1);
@@ -1320,7 +1320,7 @@ int CDECL main(int argc, char *argv[])
_masterlang = true;
ParseFile(pathbuf, true);
MakeHashOfStrings();
- if (_errors) return 1;
+ if (_errors != 0) return 1;
/* write strings.h */
ottd_mkdir(dest_dir);
@@ -1336,7 +1336,7 @@ int CDECL main(int argc, char *argv[])
ParseFile(pathbuf, true);
MakeHashOfStrings();
ParseFile(replace_pathsep(mgo.argv[0]), false); // target file
- if (_errors) return 1;
+ if (_errors != 0) return 1;
/* get the targetfile, strip any directories and append to destination path */
r = strrchr(mgo.argv[0], PATHSEPCHAR);