Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
epg: _eq_add - move e == NULL check - coverity
  • Loading branch information
perexg committed Oct 3, 2014
1 parent aff1463 commit 0cb7321
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/epg.c
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 0cb7321

Please sign in to comment.