]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unused find_first_bit()
authorJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 17:01:25 +0000 (19:01 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 17:01:25 +0000 (19:01 +0200)
This was used only for the VHT capability checks for determining bit
offset for right shift. That was replaced with a constant defines since
there is no need to calculate this at runtime.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/utils/common.c
src/utils/common.h

index 422b476c3e24088da6fcc22c6dbbf3b177c81265..182c6a8ac6c820c0effb0a7634e0652aa16dccb5 100644 (file)
@@ -607,21 +607,6 @@ int is_hex(const u8 *data, size_t len)
 }
 
 
-int find_first_bit(u32 value)
-{
-       int pos = 0;
-
-       while (value) {
-               if (value & 0x1)
-                       return pos;
-               value >>= 1;
-               pos++;
-       }
-
-       return -1;
-}
-
-
 size_t merge_byte_arrays(u8 *res, size_t res_len,
                         const u8 *src1, size_t src1_len,
                         const u8 *src2, size_t src2_len)
index 70d76a93561c8b2af6b53d4c028eb0175d71b351..7eca4095bc5a80261628264d95f84052ba8b7ed7 100644 (file)
@@ -497,7 +497,6 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
 
 char * wpa_config_parse_string(const char *value, size_t *len);
 int is_hex(const u8 *data, size_t len);
-int find_first_bit(u32 value);
 size_t merge_byte_arrays(u8 *res, size_t res_len,
                         const u8 *src1, size_t src1_len,
                         const u8 *src2, size_t src2_len);