mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-13 17:00:19 +00:00
Squashed win32 warnings
This commit is contained in:
1 parent
a5aa08e408
commit
072833acd5
1 file changed
+4
-3
+4
-3
@@ -1478,7 +1478,8 @@ int mg_websocket_write(struct mg_connection* conn, int opcode,
|
|||||||
} else {
|
} else {
|
||||||
// 64-bit length field
|
// 64-bit length field
|
||||||
copy[1] = 127;
|
copy[1] = 127;
|
||||||
* (uint32_t *) (copy + 2) = (uint32_t) htonl((uint64_t) data_len >> 32);
|
* (uint32_t *) (copy + 2) = (uint32_t)
|
||||||
|
htonl((uint32_t) ((uint64_t) data_len >> 32));
|
||||||
* (uint32_t *) (copy + 6) = (uint32_t) htonl(data_len & 0xffffffff);
|
* (uint32_t *) (copy + 6) = (uint32_t) htonl(data_len & 0xffffffff);
|
||||||
memcpy(copy + 10, data, data_len);
|
memcpy(copy + 10, data, data_len);
|
||||||
copy_len = 10 + data_len;
|
copy_len = 10 + data_len;
|
||||||
@@ -3097,8 +3098,8 @@ static void close_local_endpoint(struct connection *conn) {
|
|||||||
|
|
||||||
static void transfer_file_data(struct connection *conn) {
|
static void transfer_file_data(struct connection *conn) {
|
||||||
char buf[IOBUF_SIZE];
|
char buf[IOBUF_SIZE];
|
||||||
int n = read(conn->endpoint.fd, buf,
|
int n = read(conn->endpoint.fd, buf, conn->cl < (int64_t) sizeof(buf) ?
|
||||||
conn->cl < (int64_t) sizeof(buf) ? conn->cl : (int) sizeof(buf));
|
(int) conn->cl : (int) sizeof(buf));
|
||||||
|
|
||||||
if (is_error(n)) {
|
if (is_error(n)) {
|
||||||
close_local_endpoint(conn);
|
close_local_endpoint(conn);
|
||||||
|
|||||||
Reference in new issue
Block a user