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:
@@ -1547,7 +1547,7 @@ static int parse_request(struct connection *conn) {
|
|||||||
|
|
||||||
static int file_exists(const char *path) {
|
static int file_exists(const char *path) {
|
||||||
struct stat filestat;
|
struct stat filestat;
|
||||||
if ((stat(path, &filestat) == -1) && (errno = ENOENT))
|
if ((stat(path, &filestat) == -1) && (errno == ENOENT))
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user