iptv mux: coverity fixes
This commit is contained in:
parent
7808495eb9
commit
34c4e716ce
1 changed files with 3 additions and 3 deletions
|
@ -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) +
|
||||
|
|
Loading…
Add table
Reference in a new issue