[winpr,wlog] fix cast warning

This commit is contained in:
akallabeth 2024-09-09 15:14:10 +02:00
parent 529ce7534b
commit c1918ac189
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
1 changed files with 1 additions and 2 deletions

View File

@ -271,12 +271,11 @@ static BOOL WLog_PacketMessage_Write_EthernetHeader(wPcap* pcap, wEthernetHeader
static UINT16 IPv4Checksum(const BYTE* ipv4, int length)
{
UINT16 tmp16 = 0;
long checksum = 0;
while (length > 1)
{
tmp16 = *((UINT16*)ipv4);
const UINT16 tmp16 = *((const UINT16*)ipv4);
checksum += tmp16;
length -= 2;
ipv4 += 2;