]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsmsg: fix extra NULL check to htsmsg_cmp()
authorJaroslav Kysela <perex@perex.cz>
Thu, 12 Nov 2015 12:01:46 +0000 (13:01 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 12 Nov 2015 12:01:46 +0000 (13:01 +0100)
src/htsmsg.c

index a31e06ae3c5336b297561b367e663e966b250530..68931eaccadb15e98b33b10c03ba8d6c2e9d8cfe 100644 (file)
@@ -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 ?: ""))