1
0
mirror of https://github.com/skywind3000/kcp.git synced 2025-03-26 11:17:51 +08:00

fixed: msvc compile warning

This commit is contained in:
shixiongfei 2020-09-16 14:27:40 +08:00
parent bf616efb43
commit ce02fbd433
No known key found for this signature in database
GPG Key ID: A76C6479E0347B50

6
ikcp.c
View File

@ -636,12 +636,12 @@ static void ikcp_parse_fastack(ikcpcb *kcp, IUINT32 sn, IUINT32 ts)
//---------------------------------------------------------------------
static void ikcp_ack_push(ikcpcb *kcp, IUINT32 sn, IUINT32 ts)
{
size_t newsize = kcp->ackcount + 1;
IUINT32 newsize = kcp->ackcount + 1;
IUINT32 *ptr;
if (newsize > kcp->ackblock) {
IUINT32 *acklist;
size_t newblock;
IUINT32 newblock;
for (newblock = 8; newblock < newsize; newblock <<= 1);
acklist = (IUINT32*)ikcp_malloc(newblock * sizeof(IUINT32) * 2);
@ -652,7 +652,7 @@ static void ikcp_ack_push(ikcpcb *kcp, IUINT32 sn, IUINT32 ts)
}
if (kcp->acklist != NULL) {
size_t x;
IUINT32 x;
for (x = 0; x < kcp->ackcount; x++) {
acklist[x * 2 + 0] = kcp->acklist[x * 2 + 0];
acklist[x * 2 + 1] = kcp->acklist[x * 2 + 1];