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
1 changed files with 1 additions and 1 deletions

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;