clang format corrected for file

This commit is contained in:
pranavPandit1 2022-04-28 12:41:48 +00:00 committed by Jingyu Zhou
parent 195a196392
commit 5794fd4e91

View File

@ -274,21 +274,20 @@ append_hw(uint32_t crc, const uint8_t* buf, size_t len) {
#endif #endif
uint32_t ppc_hw(uint32_t crc, const uint8_t* input, size_t length) { uint32_t ppc_hw(uint32_t crc, const uint8_t* input, size_t length) {
return CRC32_FUNCTION(0, (unsigned char*)input, (unsigned long)length); return CRC32_FUNCTION(0, (unsigned char*)input, (unsigned long)length);
} }
#endif #endif
static bool hw_available = platform::isHwCrcSupported(); static bool hw_available = platform::isHwCrcSupported();
extern "C" uint32_t crc32c_append(uint32_t crc, const uint8_t* input, size_t length) { extern "C" uint32_t crc32c_append(uint32_t crc, const uint8_t* input, size_t length) {
if (hw_available) { if (hw_available) {
#ifdef __powerpc64__ #ifdef __powerpc64__
return ppc_hw(crc, input, length); return ppc_hw(crc, input, length);
#endif #endif
#ifndef __powerpc64__ #ifndef __powerpc64__
return append_hw(crc, input, length); return append_hw(crc, input, length);
#endif #endif
} else } else
return append_table(crc, input, length); return append_table(crc, input, length);
} }