From: Jaroslav Kysela Date: Fri, 3 Oct 2014 12:59:04 +0000 (+0200) Subject: htsp server: fix wrong fd condition (coverity) X-Git-Tag: v4.1~1201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36254905d72c19e57051c79309e600433039bd42;p=thirdparty%2Ftvheadend.git htsp server: fix wrong fd condition (coverity) --- diff --git a/src/htsp_server.c b/src/htsp_server.c index 5204d5deb..c3c1420f4 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -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);