another round of coverity fixes (mostly NULL checks)
This commit is contained in:
parent
36166ca644
commit
49396483c5
4 changed files with 15 additions and 8 deletions
|
@ -713,7 +713,8 @@ config_modify_tag( htsmsg_t *c, uint32_t id, const char *uuid, const void *aux )
|
|||
htsmsg_add_msg(e, "tags_new", t);
|
||||
t = htsmsg_get_list(e, "tags_new");
|
||||
}
|
||||
htsmsg_add_str(t, NULL, uuid);
|
||||
if (t)
|
||||
htsmsg_add_str(t, NULL, uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -791,7 +792,9 @@ config_modify_dvr_log( htsmsg_t *c, uint32_t id, const char *uuid, const void *a
|
|||
HTSMSG_FOREACH(f, list) {
|
||||
if (!(e = htsmsg_field_get_map(f))) continue;
|
||||
if (strcmp(s1, htsmsg_get_str(e, "id") ?: "") == 0) {
|
||||
htsmsg_add_str(c, "autorec", htsmsg_get_str(e, "uuid"));
|
||||
const char *s2 = htsmsg_get_str(e, "uuid");
|
||||
if (s2)
|
||||
htsmsg_add_str(c, "autorec", s2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -877,6 +880,8 @@ config_find_uuid( htsmsg_t *map, const char *name, const char *value )
|
|||
htsmsg_field_t *f;
|
||||
const char *s;
|
||||
|
||||
if (!map || !name || !value)
|
||||
return NULL;
|
||||
HTSMSG_FOREACH(f, map) {
|
||||
if (!(e = htsmsg_field_get_map(f))) continue;
|
||||
if ((s = htsmsg_get_str(e, name)) != NULL) {
|
||||
|
|
|
@ -1447,8 +1447,7 @@ dvr_entry_class_disp_title_set(void *o, const void *v)
|
|||
if (strcmp(s, v)) {
|
||||
lang_str_destroy(de->de_title);
|
||||
de->de_title = lang_str_create();
|
||||
if (v)
|
||||
lang_str_add(de->de_title, v, NULL, 0);
|
||||
lang_str_add(de->de_title, v, NULL, 0);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -228,9 +228,12 @@ my_double2str(char *buf, size_t bufsize, double realvalue)
|
|||
precision = precision - exp;
|
||||
xtype = xFLOAT;
|
||||
}
|
||||
}else{
|
||||
}
|
||||
#if 0 /* coverity - dead code - xtype == xGENERIC here */
|
||||
else{
|
||||
flag_rtz = 0;
|
||||
}
|
||||
#endif
|
||||
if( xtype==xEXP ){
|
||||
e2 = 0;
|
||||
}else{
|
||||
|
|
|
@ -656,14 +656,14 @@ _mk_build_metadata(const dvr_entry_t *de, const epg_broadcast_t *ebc)
|
|||
struct tm tm;
|
||||
localtime_r(de ? &de->de_start : &ebc->start, &tm);
|
||||
epg_episode_t *ee = NULL;
|
||||
channel_t *ch;
|
||||
channel_t *ch = NULL;
|
||||
lang_str_t *ls = NULL;
|
||||
|
||||
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;
|
||||
if (de) ch = de->de_channel;
|
||||
else if (ebc) ch = ebc->channel;
|
||||
|
||||
snprintf(datestr, sizeof(datestr),
|
||||
"%04d-%02d-%02d %02d:%02d:%02d",
|
||||
|
|
Loading…
Add table
Reference in a new issue