Changed return type of CRC16 to uint16

This commit is contained in:
Derision 2013-04-28 18:57:08 +01:00
parent d2c7f23ec9
commit 022713996a
3 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,10 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 04/28/2013 ==
PiB: Implement CRC16 using CRC32.
== 04/27/2013 ==
Pixel Bounds: Verify OP_Ack size & fix crash in BasePacket::build_raw_header_dump due to uninitialised timestamp.
PiB: Verify OP_Ack size & fix crash in BasePacket::build_raw_header_dump due to uninitialised timestamp.
Derision: Verify minimum size of OP_Packet, OP_Fragment and OP_OutOfOrderAck.
== 04/24/2013 ==

View File

@ -1,6 +1,6 @@
#include "crc32.h"
unsigned long CRC16(const unsigned char *buf, int size, int key)
uint16 CRC16(const unsigned char *buf, int size, int key)
{
// This is computed as the lowest 16 bits of an Ethernet CRC32 checksum
// where the key is prepended to the data in little endian order.

View File

@ -1,6 +1,7 @@
#ifndef _CRC16_H
#define _CRC16_H
#include "types.h"
unsigned long CRC16(const unsigned char *buf, int size, int key);
uint16 CRC16(const unsigned char *buf, int size, int key);
#endif