mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-01 23:45:48 +03:00
coap_encode.c: Fix coap_flsll() for negative numbers
This commit is contained in:
1 parent
00e4510636
commit
53615f5643
1 file changed
+2
-1
+2
-1
@@ -23,8 +23,9 @@ int coap_fls(unsigned int i) {
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FLSLL
|
||||
int coap_flsll(long long i)
|
||||
int coap_flsll(long long j)
|
||||
{
|
||||
unsigned long long i = (unsigned long long)j;
|
||||
int n;
|
||||
for (n = 0; i; n++)
|
||||
i >>= 1;
|
||||
|
||||
Reference in new issue
Block a user