mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
Made mg_connection::content_len int -> size_t, which is 64-bit on 64-bit systems
This commit is contained in:
1 parent
503a1a749d
commit
976f286134
3 files changed
+5
-5
No files matched your search
+2
-2
@@ -440,7 +440,7 @@ static int cb2(struct mg_connection *conn) {
|
||||
file_name = file1;
|
||||
}
|
||||
if ((file_data = read_file(file_name, &file_len)) != NULL) {
|
||||
if (file_len == conn->content_len &&
|
||||
if ((size_t) file_len == conn->content_len &&
|
||||
memcmp(file_data, conn->content, file_len) == 0) {
|
||||
strcat(buf, "d");
|
||||
} else {
|
||||
@@ -526,7 +526,7 @@ static int us1(struct mg_connection *conn) {
|
||||
} else if (conn->status_code == MG_DOWNLOAD_SUCCESS) {
|
||||
char *file_data = read_file(file_name, &file_size);
|
||||
sprintf((char *) conn->connection_param, "%d",
|
||||
file_size == conn->content_len &&
|
||||
(size_t) file_size == conn->content_len &&
|
||||
memcmp(file_data, conn->content, file_size) == 0 ? 1 : 0);
|
||||
free(file_data);
|
||||
} else if (conn->status_code == MG_CONNECT_FAILURE) {
|
||||
|
||||
Reference in new issue
Block a user