alloc: dont clash with libc's fls, avoid void pointer arithmetic
[ccan] / ccan / alloc / bitops.c
index b408a20f0e579d8ce83228f1fc60a79a6f7e844f..e1f25f974e7ec36bf938741f561e366b83824039 100644 (file)
@@ -5,7 +5,7 @@
 #include <ccan/ilog/ilog.h>
 #include <limits.h>
 
-unsigned int fls(unsigned long val)
+unsigned int afls(unsigned long val)
 {
        BUILD_ASSERT(sizeof(val) == sizeof(u32) || sizeof(val) == sizeof(u64));
        if (sizeof(val) == sizeof(u32))
@@ -15,7 +15,7 @@ unsigned int fls(unsigned long val)
 }
 
 /* FIXME: Move to bitops. */
-unsigned int ffsl(unsigned long val)
+unsigned int affsl(unsigned long val)
 {
 #if HAVE_BUILTIN_FFSL
        /* This is significantly faster! */