mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-03-10 04:11:17 +00:00
15 lines
162 B
C
15 lines
162 B
C
#include "intmath.h"
|
|
|
|
#ifndef HAVE_BSD_FLS
|
|
int fls(int value)
|
|
{
|
|
int i;
|
|
|
|
for (i = 31; i >= 0; i--)
|
|
if (value & (1 << i))
|
|
return i + 1;
|
|
|
|
return 0;
|
|
}
|
|
#endif
|