diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/socket.c | 6 | ||||
-rw-r--r-- | src/common/socket.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index f9ee16bf9..025776172 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -817,7 +817,7 @@ static int rfifoskip(int fd, size_t len) const size_t lenRest = RFIFOREST(fd); if (s->flag.validate == 1 && len == lenRest) { if (lenRest >= 2) { - const uint cmd = (uint)RFIFOW(fd, 0); + const uint32 cmd = (uint32)RFIFOW(fd, 0); if (cmd < MIN_PACKET_DB || cmd > MAX_PACKET_DB) { ShowError("Skip wrong packet id: 0x%04X\n", cmd); Assert_report(0); @@ -2102,8 +2102,8 @@ static void socket_validateWfifo(int fd, size_t len) Assert_retv(0); return; } - const uint cmd = (uint)WFIFOW(fd, 0); - const uint last_head_size = sockt->session[fd]->last_head_size; + const uint32 cmd = (uint32)WFIFOW(fd, 0); + const uint32 last_head_size = sockt->session[fd]->last_head_size; sockt->session[fd]->last_head_size = 0; if (cmd < MIN_PACKET_DB || cmd > MAX_PACKET_DB) { diff --git a/src/common/socket.h b/src/common/socket.h index c5d0e224e..5e4251989 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -128,7 +128,7 @@ struct socket_data { size_t max_rdata, max_wdata; size_t rdata_size, wdata_size; size_t rdata_pos; - uint last_head_size; + uint32 last_head_size; time_t rdata_tick; // time of last recv (for detecting timeouts); zero when timeout is disabled RecvFunc func_recv; |