From 34c4e716cef6863787548308cc43d8fb3b248154 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 3 Oct 2014 21:59:29 +0200 Subject: [PATCH] iptv mux: coverity fixes --- src/input/mpegts/iptv/iptv_mux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/input/mpegts/iptv/iptv_mux.c b/src/input/mpegts/iptv/iptv_mux.c index a9e1649f..ef088c91 100644 --- a/src/input/mpegts/iptv/iptv_mux.c +++ b/src/input/mpegts/iptv/iptv_mux.c @@ -35,7 +35,7 @@ iptv_mux_url_set ( void *p, const void *v ) size_t len; url_t url; - if (strcmp(str, im->mm_iptv_url ?: "")) { + if (strcmp(str ?: "", im->mm_iptv_url ?: "")) { if (str == NULL || *str == '\0') { free(im->mm_iptv_url); free(im->mm_iptv_url_sane); @@ -44,10 +44,10 @@ iptv_mux_url_set ( void *p, const void *v ) return 1; } memset(&url, 0, sizeof(url)); - if (!urlparse(str ?: "", &url)) { + if (!urlparse(str, &url)) { free(im->mm_iptv_url); free(im->mm_iptv_url_sane); - im->mm_iptv_url = str ? strdup(str) : NULL; + im->mm_iptv_url = strdup(str); if (im->mm_iptv_url) { len = (url.scheme ? strlen(url.scheme) + 3 : 0) + (url.host ? strlen(url.host) + 1 : 0) +