btstack_util: fix btstack_clz for 'other' compilers

This commit is contained in:
Alec Cantor 2023-07-11 15:38:41 -04:00 committed by Matthias Ringwald
parent 294f7bb5b2
commit af0ac87149

View File

@ -466,6 +466,7 @@ uint8_t btstack_clz(uint32_t value) {
}
#else
// divide-and-conquer implementation for 32-bit integers
uint32_t x = value;
if (x == 0) return 32;
uint8_t r = 0;
if ((x & 0xffff0000u) == 0) {