Compare return value of strncmp to 0, not NULL

This commit is contained in:
Timotej Lazar 2020-04-22 02:43:23 +02:00
parent e5ce2cb250
commit b87daf8d02

View file

@ -437,7 +437,7 @@ Chunk* Chunk_With_Children::lookup_single_child (const char * 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());
return child_ptr;