mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 11:09:01 +08:00
Fix #1297 - %p warning
This commit is contained in:
parent
39d64be581
commit
80fcba91c8
@ -28,8 +28,8 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
|
||||
static void usage(const char *prog) {
|
||||
fprintf(stderr,
|
||||
"Mongoose v.%s, built " __DATE__ " " __TIME__
|
||||
"\nUsage: %s OPTIONS\n"
|
||||
"Mongoose v.%s\n"
|
||||
"Usage: %s OPTIONS\n"
|
||||
" -H yes|no - enable traffic hexdump, default: '%s'\n"
|
||||
" -S GLOB - glob pattern for SSI files, default: '%s'\n"
|
||||
" -d DIR - directory to serve, default: '%s'\n"
|
||||
|
@ -929,8 +929,8 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
|
||||
FILE *fp = mg_fopen(path, "rb");
|
||||
if (fp == NULL || mg_stat(path, &st) != 0 ||
|
||||
mg_http_etag(etag, sizeof(etag), &st) != etag) {
|
||||
LOG(LL_DEBUG,
|
||||
("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path, fp));
|
||||
LOG(LL_DEBUG, ("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path,
|
||||
(void *) fp));
|
||||
mg_http_reply(c, 404, "", "%s", "Not found\n");
|
||||
if (fp != NULL) fclose(fp);
|
||||
} else if (inm != NULL && mg_vcasecmp(inm, etag) == 0) {
|
||||
|
@ -518,8 +518,8 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
|
||||
FILE *fp = mg_fopen(path, "rb");
|
||||
if (fp == NULL || mg_stat(path, &st) != 0 ||
|
||||
mg_http_etag(etag, sizeof(etag), &st) != etag) {
|
||||
LOG(LL_DEBUG,
|
||||
("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path, fp));
|
||||
LOG(LL_DEBUG, ("404 [%.*s] [%s] %p", (int) hm->uri.len, hm->uri.ptr, path,
|
||||
(void *) fp));
|
||||
mg_http_reply(c, 404, "", "%s", "Not found\n");
|
||||
if (fp != NULL) fclose(fp);
|
||||
} else if (inm != NULL && mg_vcasecmp(inm, etag) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user