mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Fix file_exists() comparison.
Found with: git://repo.or.cz/smatch.git
This commit is contained in:
parent
4d28b300be
commit
1f3f104166
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user