]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsp server: fix wrong fd condition (coverity)
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 12:59:04 +0000 (14:59 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 12:59:04 +0000 (14:59 +0200)
src/htsp_server.c

index 5204d5deb6e37dea77480c186aea210f874ef2cc..c3c1420f4e4604d6c1f0c354f74e2b5c98ab8263 100644 (file)
@@ -2006,7 +2006,7 @@ htsp_method_file_open(htsp_connection_t *htsp, htsmsg_t *in)
 
   } else if ((s2 = tvh_strbegins(str, "imagecache/")) != NULL) {
     int fd = imagecache_open(atoi(s2));
-    if (fd <= 0)
+    if (fd < 0)
       return htsp_error("failed to open image");
     return htsp_file_open(htsp, str, fd);