changing {} style to match majority of previous style

This commit is contained in:
Philippe Teuwen 2019-03-10 11:20:22 +01:00
commit 961d929f4d
320 changed files with 5502 additions and 10485 deletions

View file

@ -5,8 +5,7 @@
static void crc32_byte(uint32_t *crc, const uint8_t value);
static void crc32_byte(uint32_t *crc, const uint8_t value)
{
static void crc32_byte(uint32_t *crc, const uint8_t value) {
/* x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 */
const uint32_t poly = 0xEDB88320;
@ -19,8 +18,7 @@ static void crc32_byte(uint32_t *crc, const uint8_t value)
}
}
void crc32_ex(const uint8_t *data, const size_t len, uint8_t *crc)
{
void crc32_ex(const uint8_t *data, const size_t len, uint8_t *crc) {
uint32_t desfire_crc = CRC32_PRESET;
for (size_t i = 0; i < len; i++) {
crc32_byte(&desfire_crc, data[i]);
@ -29,7 +27,6 @@ void crc32_ex(const uint8_t *data, const size_t len, uint8_t *crc)
*((uint32_t *)(crc)) = htole32(desfire_crc);
}
void crc32_append(uint8_t *data, const size_t len)
{
void crc32_append(uint8_t *data, const size_t len) {
crc32_ex(data, len, data + len);
}