From 7781da6b2bb95e14d9305d5cea9d3f9228473720 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 14 Dec 2014 19:01:25 +0200 Subject: [PATCH] Remove unused find_first_bit() 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 --- src/utils/common.c | 15 --------------- src/utils/common.h | 1 - 2 files changed, 16 deletions(-) diff --git a/src/utils/common.c b/src/utils/common.c index 422b476c3..182c6a8ac 100644 --- a/src/utils/common.c +++ b/src/utils/common.c @@ -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) diff --git a/src/utils/common.h b/src/utils/common.h index 70d76a935..7eca4095b 100644 --- a/src/utils/common.h +++ b/src/utils/common.h @@ -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);