diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 1f0eb04473b2..c4edca62bf93 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -952,11 +952,12 @@ ether_crc32_le(const uint8_t *buf, size_t len) crc = 0xffffffff; /* initial value */ for (i = 0; i < len; i++) { - for (data = *buf++, bit = 0; bit < 8; bit++, data >>= 1) + for (data = *buf++, bit = 0; bit < 8; bit++, data >>= 1) { carry = (crc ^ data) & 1; crc >>= 1; if (carry) crc = (crc ^ ETHER_CRC_POLY_LE); + } } return (crc);