MCPcopy Create free account
hub / github.com/F-Stack/f-stack / crc16

Function crc16

app/redis-6.2.6/src/crc16.c:82–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80};
81
82uint16_t crc16(const char *buf, int len) {
83 int counter;
84 uint16_t crc = 0;
85 for (counter = 0; counter < len; counter++)
86 crc = (crc<<8) ^ crc16tab[((crc>>8) ^ *buf++)&0x00FF];
87 return crc;
88}

Callers 2

keyHashSlotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected