X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=lwext4%2Fext4_block_group.c;h=7f068b9b1e9dd4ed8d6a00c65025abc6d4bff584;hb=bdb50541baac6e536b7201ccf35abe56816bec04;hp=74260876fd18c341abf5f719348df794f6c2a06f;hpb=6afb3d26fab0d2294221ac0c2b97c7ee8f52b77f;p=lwext4.git diff --git a/lwext4/ext4_block_group.c b/lwext4/ext4_block_group.c index 7426087..7f068b9 100644 --- a/lwext4/ext4_block_group.c +++ b/lwext4/ext4_block_group.c @@ -39,8 +39,8 @@ * @brief Block group function set. */ -#include -#include +#include "ext4_config.h" +#include "ext4_block_group.h" /**@brief CRC-16 look up table*/ static uint16_t const crc16_tab[256] = { @@ -76,11 +76,12 @@ static uint16_t const crc16_tab[256] = { uint16_t ext4_bg_crc16(uint16_t crc, const uint8_t *buffer, size_t len) { - while (len--) + while (len--) - crc = (((crc >> 8) & 0xffU) ^ crc16_tab[(crc ^ *buffer++) & 0xffU]) & - 0x0000ffffU; - return crc; + crc = (((crc >> 8) & 0xffU) ^ + crc16_tab[(crc ^ *buffer++) & 0xffU]) & + 0x0000ffffU; + return crc; } /**