Fix #1351 - squash warning

This commit is contained in:
Sergey Lyubka 2021-09-17 11:07:20 +01:00
parent 40b3382023
commit c7bd63ef53
2 changed files with 2 additions and 2 deletions

View File

@ -1281,7 +1281,7 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
struct mg_str *inm = NULL; struct mg_str *inm = NULL;
if (fd == NULL || fs->stat(path, &size, &mtime) == 0) { if (fd == NULL || fs->stat(path, &size, &mtime) == 0) {
LOG(LL_DEBUG, ("404 [%.*s] %p", (int) hm->uri.len, hm->uri.ptr, fd)); LOG(LL_DEBUG, ("404 [%s] %p", path, (void *) fd));
mg_http_reply(c, 404, "", "%s", "Not found\n"); mg_http_reply(c, 404, "", "%s", "Not found\n");
fs->close(fd); fs->close(fd);
// NOTE: mg_http_etag() call should go first! // NOTE: mg_http_etag() call should go first!

View File

@ -531,7 +531,7 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
struct mg_str *inm = NULL; struct mg_str *inm = NULL;
if (fd == NULL || fs->stat(path, &size, &mtime) == 0) { if (fd == NULL || fs->stat(path, &size, &mtime) == 0) {
LOG(LL_DEBUG, ("404 [%.*s] %p", (int) hm->uri.len, hm->uri.ptr, fd)); LOG(LL_DEBUG, ("404 [%s] %p", path, (void *) fd));
mg_http_reply(c, 404, "", "%s", "Not found\n"); mg_http_reply(c, 404, "", "%s", "Not found\n");
fs->close(fd); fs->close(fd);
// NOTE: mg_http_etag() call should go first! // NOTE: mg_http_etag() call should go first!