]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epg: _eq_add - move e == NULL check - coverity
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 15:27:20 +0000 (17:27 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 15:27:20 +0000 (17:27 +0200)
src/epg.c

index 0111523340d5670070285f39c0ef0aac54ba6047..ad1a5edd898c7b7d165a8a014bc8c2e9505a6506 100644 (file)
--- a/src/epg.c
+++ b/src/epg.c
@@ -2242,6 +2242,7 @@ _eq_add ( epg_query_t *eq, epg_broadcast_t *e )
   epg_episode_t *ep;
 
   /* Filtering */
+  if (e == NULL) return;
   if (e->stop < dispatch_clock) return;
   if (_eq_comp_num(&eq->start, e->start)) return;
   if (_eq_comp_num(&eq->stop, e->stop)) return;
@@ -2250,14 +2251,10 @@ _eq_add ( epg_query_t *eq, epg_broadcast_t *e )
     if (_eq_comp_num(&eq->duration, duration)) return;
   }
   ep = e->episode;
-  if (eq->stars.comp != EC_NO) {
-    if (e == NULL) return;
+  if (eq->stars.comp != EC_NO)
     if (_eq_comp_num(&eq->stars, ep->star_rating)) return;
-  }
-  if (eq->age.comp != EC_NO) {
-    if (e == NULL) return;
+  if (eq->age.comp != EC_NO)
     if (_eq_comp_num(&eq->age, ep->age_rating)) return;
-  }
   if (eq->channel_num.comp != EC_NO)
     if (_eq_comp_num(&eq->channel_num, channel_get_number(e->channel))) return;
   if (eq->channel_name.comp != EC_NO)