Fix file_exists() comparison.

Found with: git://repo.or.cz/smatch.git
This commit is contained in:
Emil Mikulic 2013-06-10 18:56:14 +10:00
parent 4d28b300be
commit 1f3f104166

View File

@ -1547,7 +1547,7 @@ static int parse_request(struct connection *conn) {
static int file_exists(const char *path) {
struct stat filestat;
if ((stat(path, &filestat) == -1) && (errno = ENOENT))
if ((stat(path, &filestat) == -1) && (errno == ENOENT))
return 0;
else
return 1;