diff options
| author | Steven Fuller <relnev@icculus.org> | 2001-12-18 02:23:39 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:37 +0200 |
| commit | 95b8b49b7602e4e2d3cd9e38273fa94451bec780 (patch) | |
| tree | 2680f7beffc79957bb057cb018d4d7bc5c8ff2a3 /src/win95/chunk.cpp | |
| parent | abab1011ac9f80ca3b734bd70415ff255965441b (diff) | |
More Warning cleanups (Tim Beckmann)
Diffstat (limited to 'src/win95/chunk.cpp')
| -rw-r--r-- | src/win95/chunk.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/win95/chunk.cpp b/src/win95/chunk.cpp index a068f87..6e61338 100644 --- a/src/win95/chunk.cpp +++ b/src/win95/chunk.cpp @@ -231,8 +231,7 @@ Chunk_With_Children const * Chunk::GetRootChunk(void) const Miscellaneous_Chunk::Miscellaneous_Chunk (Chunk_With_Children * parent, const char * identifier, const char * _data, size_t _data_size) -: Chunk (parent, identifier), -data(NULL), data_size (_data_size) +: Chunk (parent, identifier), data_size (_data_size), data(NULL) { if (data_size) { @@ -407,7 +406,7 @@ void Chunk_With_Children::lookup_child (const char * class_ident,List<Chunk*>& c if (children) while (child_ptr != NULL) { - if (strncmp (class_ident, child_ptr->identifier, 8) == NULL) + if (strncmp (class_ident, child_ptr->identifier, 8) == 0) { assert (!child_ptr->r_u_miscellaneous()); child_list.add_entry(child_ptr); @@ -426,7 +425,7 @@ unsigned Chunk_With_Children::count_children (char const * class_ident) const if (children) while (child_ptr != NULL) { - if (strncmp (class_ident, child_ptr->identifier, 8) == NULL) + if (strncmp (class_ident, child_ptr->identifier, 8) == 0) { assert (!child_ptr->r_u_miscellaneous()); ++ nChildren; @@ -445,7 +444,7 @@ Chunk* Chunk_With_Children::lookup_single_child (const char * class_ident) const Chunk * chunk_found=0; if (children) while (child_ptr != NULL) { - if (strncmp (class_ident, child_ptr->identifier, 8) == NULL) + if (strncmp (class_ident, child_ptr->identifier, 8) == 0) { assert (!child_ptr->r_u_miscellaneous()); assert(!chunk_found); |
