Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
minor coverity fixes
  • Loading branch information
perexg committed Dec 6, 2016
1 parent 290cf51 commit dc73bf5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/config.c
Expand Up @@ -519,7 +519,9 @@ config_migrate_v3 ( void )
if (!access(dst, R_OK | W_OK))
return;

hts_settings_makedirs(dst);
if (hts_settings_makedirs(dst))
return;

hts_settings_buildpath(src, sizeof(src), "input/linuxdvb/networks");
rename(src, dst);
}
Expand Down
5 changes: 4 additions & 1 deletion src/descrambler/descrambler.c
Expand Up @@ -422,9 +422,12 @@ descrambler_external ( service_t *t, int state )
{
th_descrambler_runtime_t *dr;

if (t == NULL)
return;

lock_assert(&t->s_stream_mutex);

if (t == NULL || (dr = t->s_descramble) == NULL)
if ((dr = t->s_descramble) == NULL)
return;
dr->dr_external = state ? 1 : 0;
service_reset_streaming_status_flags(t, TSS_NO_DESCRAMBLER);
Expand Down
4 changes: 3 additions & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_ca.c
Expand Up @@ -141,7 +141,9 @@ linuxdvb_ca_class_enabled_notify ( void *p, const char *lang )
pthread_join(lca->lca_en50221_thread, NULL);
}

ioctl(lca->lca_ca_fd, CA_RESET, NULL);
if (ioctl(lca->lca_ca_fd, CA_RESET, NULL))
tvherror(LS_LINUXDVB, "unable to reset ca%u %s",
lca->lca_number, lca->lca_ca_path);

close(lca->lca_ca_fd);
lca->lca_ca_fd = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_en50494.c
Expand Up @@ -236,7 +236,7 @@ linuxdvb_en50607_freq0
( linuxdvb_en50494_t *le, int freq, int *rfreq, uint16_t *t )
{
/* transponder value - t */
*t = round(freq / 1000) - 100;
*t = round((double)freq / 1000) - 100;
if (*t > 2047) {
tvherror(LS_EN50494, "transponder value bigger then 2047 for freq %d (%d)", freq, le->le_frequency);
return -1;
Expand Down

0 comments on commit dc73bf5

Please sign in to comment.