htsp server: fix wrong fd condition (coverity)

This commit is contained in:
Jaroslav Kysela 2014-10-03 14:59:04 +02:00
parent fc915fcdc4
commit 36254905d7

View 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);