diff --git a/darkhttpd.c b/darkhttpd.c index e1b0407..7ce3c53 100644 --- a/darkhttpd.c +++ b/darkhttpd.c @@ -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;