coverity fixes: some wrong NULL checks
This commit is contained in:
parent
d94850a3f8
commit
1932c7e564
4 changed files with 10 additions and 7 deletions
|
@ -410,7 +410,7 @@ dvr_autorec_entry_class_title_set(void *o, const void *v)
|
|||
free(dae->dae_title);
|
||||
dae->dae_title = NULL;
|
||||
}
|
||||
if (title != NULL && title[0] != '\0' &&
|
||||
if (title[0] != '\0' &&
|
||||
!regcomp(&dae->dae_title_preg, title,
|
||||
REG_ICASE | REG_EXTENDED | REG_NOSUB))
|
||||
dae->dae_title = strdup(title);
|
||||
|
|
|
@ -178,11 +178,12 @@ pvr_generate_filename(dvr_entry_t *de, const streaming_start_t *ss)
|
|||
struct stat st;
|
||||
char *filename, *s;
|
||||
struct tm tm;
|
||||
dvr_config_t *cfg = de->de_config;
|
||||
dvr_config_t *cfg;
|
||||
|
||||
if (de == NULL)
|
||||
return -1;
|
||||
|
||||
cfg = de->de_config;
|
||||
strncpy(path, cfg->dvr_storage, sizeof(path));
|
||||
path[sizeof(path)-1] = '\0';
|
||||
|
||||
|
|
|
@ -118,9 +118,11 @@ static int
|
|||
linuxdvb_frontend_dvbs_class_satconf_set ( void *self, const void *str )
|
||||
{
|
||||
linuxdvb_frontend_t *lfe = self;
|
||||
if (lfe->lfe_satconf && !strcmp(str ?: "", lfe->lfe_satconf->ls_type))
|
||||
return 0;
|
||||
linuxdvb_satconf_delete(lfe->lfe_satconf, 1);
|
||||
if (lfe->lfe_satconf) {
|
||||
if (!strcmp(str ?: "", lfe->lfe_satconf->ls_type))
|
||||
return 0;
|
||||
linuxdvb_satconf_delete(lfe->lfe_satconf, 1);
|
||||
}
|
||||
lfe->lfe_satconf = linuxdvb_satconf_create(lfe, str, NULL, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -659,8 +659,8 @@ _mk_build_metadata(const dvr_entry_t *de, const epg_broadcast_t *ebc)
|
|||
channel_t *ch;
|
||||
lang_str_t *ls = NULL;
|
||||
|
||||
if (ebc) ee = ebc->episode;
|
||||
else if (de->de_bcast) ee = de->de_bcast->episode;
|
||||
if (ebc) ee = ebc->episode;
|
||||
else if (de && de->de_bcast) ee = de->de_bcast->episode;
|
||||
|
||||
if (de) ch = de->de_channel;
|
||||
else ch = ebc->channel;
|
||||
|
|
Loading…
Add table
Reference in a new issue