From: Jaroslav Kysela Date: Thu, 12 Nov 2015 12:01:46 +0000 (+0100) Subject: htsmsg: fix extra NULL check to htsmsg_cmp() X-Git-Tag: v4.2.1~1568 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9dc4e45d7d38514623f086b7f4a468fda3bd88ca;p=thirdparty%2Ftvheadend.git htsmsg: fix extra NULL check to htsmsg_cmp() --- diff --git a/src/htsmsg.c b/src/htsmsg.c index a31e06ae3..68931eacc 100644 --- a/src/htsmsg.c +++ b/src/htsmsg.c @@ -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 ?: ""))