Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
htsmsg: fix extra NULL check to htsmsg_cmp()
  • Loading branch information
perexg committed Nov 12, 2015
1 parent 66b12c4 commit 9dc4e45
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/htsmsg.c
Expand Up @@ -951,14 +951,11 @@ htsmsg_cmp(htsmsg_t *m1, htsmsg_t *m2)
return 1;

f2 = TAILQ_FIRST(&m2->hm_fields);
if (f2 == NULL) {
if (TAILQ_FIRST(&m1->hm_fields) == NULL)
return 0;
return 1;
}

TAILQ_FOREACH(f1, &m1->hm_fields, hmf_link) {

if (f2 == NULL)
return 1;

if (f1->hmf_type != f2->hmf_type)
return 1;
if (strcmp(f1->hmf_name ?: "", f2->hmf_name ?: ""))
Expand Down

0 comments on commit 9dc4e45

Please sign in to comment.