1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-12-22 04:02:04 +03:00

Clean after merge

This commit is contained in:
bel
2016-01-14 23:50:22 +01:00
parent 9c8c2cec44
commit 1dc88bc5ef

View File

@@ -1472,6 +1472,8 @@ mg_fopen(struct mg_connection *conn,
const char *mode, const char *mode,
struct file *filep) struct file *filep)
{ {
struct stat st;
if (!filep) { if (!filep) {
return 0; return 0;
} }
@@ -1481,9 +1483,9 @@ mg_fopen(struct mg_connection *conn,
* the same structure (bad cohesion). */ * the same structure (bad cohesion). */
memset(filep, 0, sizeof(*filep)); memset(filep, 0, sizeof(*filep));
struct stat st; if (stat(path, &st) == 0) {
if (stat(path, &st) == 0) filep->size = (uint64_t)(st.st_size);
filep->size = st.st_size; }
if (!is_file_in_memory(conn, path, filep)) { if (!is_file_in_memory(conn, path, filep)) {
#ifdef _WIN32 #ifdef _WIN32