Bluetooth: Remove unneeded macros
Remove the `bt_hex`, `bt_addr_str`, `bt_addr_le_str` and `bt_uuid_str` macros from `bt_str.h` as they were just aliases for the `*_real` functions in the same file. The functions has been renamed without the `_real` suffix. Some files were using the functions and not the macros, they have been updated to use the new name of the functions. Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This commit is contained in:
parent
effb76c61e
commit
7d2b4e1917
|
@ -16,7 +16,7 @@
|
|||
#include <zephyr/sys/util.h>
|
||||
#include <zephyr/types.h>
|
||||
|
||||
const char *bt_hex_real(const void *buf, size_t len)
|
||||
const char *bt_hex(const void *buf, size_t len)
|
||||
{
|
||||
static const char hex[] = "0123456789abcdef";
|
||||
static char str[129];
|
||||
|
@ -35,7 +35,7 @@ const char *bt_hex_real(const void *buf, size_t len)
|
|||
return str;
|
||||
}
|
||||
|
||||
const char *bt_addr_str_real(const bt_addr_t *addr)
|
||||
const char *bt_addr_str(const bt_addr_t *addr)
|
||||
{
|
||||
static char str[BT_ADDR_STR_LEN];
|
||||
|
||||
|
@ -44,7 +44,7 @@ const char *bt_addr_str_real(const bt_addr_t *addr)
|
|||
return str;
|
||||
}
|
||||
|
||||
const char *bt_addr_le_str_real(const bt_addr_le_t *addr)
|
||||
const char *bt_addr_le_str(const bt_addr_le_t *addr)
|
||||
{
|
||||
static char str[BT_ADDR_LE_STR_LEN];
|
||||
|
||||
|
@ -53,7 +53,7 @@ const char *bt_addr_le_str_real(const bt_addr_le_t *addr)
|
|||
return str;
|
||||
}
|
||||
|
||||
const char *bt_uuid_str_real(const struct bt_uuid *uuid)
|
||||
const char *bt_uuid_str(const struct bt_uuid *uuid)
|
||||
{
|
||||
static char str[BT_UUID_STR_LEN];
|
||||
|
||||
|
|
|
@ -11,12 +11,7 @@
|
|||
*
|
||||
* NOTE: These functions are not thread-safe!
|
||||
*/
|
||||
const char *bt_hex_real(const void *buf, size_t len);
|
||||
const char *bt_addr_str_real(const bt_addr_t *addr);
|
||||
const char *bt_addr_le_str_real(const bt_addr_le_t *addr);
|
||||
const char *bt_uuid_str_real(const struct bt_uuid *uuid);
|
||||
|
||||
#define bt_hex(buf, len) bt_hex_real(buf, len)
|
||||
#define bt_addr_str(addr) bt_addr_str_real(addr)
|
||||
#define bt_addr_le_str(addr) bt_addr_le_str_real(addr)
|
||||
#define bt_uuid_str(uuid) bt_uuid_str_real(uuid)
|
||||
const char *bt_hex(const void *buf, size_t len);
|
||||
const char *bt_addr_str(const bt_addr_t *addr);
|
||||
const char *bt_addr_le_str(const bt_addr_le_t *addr);
|
||||
const char *bt_uuid_str(const struct bt_uuid *uuid);
|
||||
|
|
|
@ -3517,7 +3517,7 @@ static void eatt_auto_connect(struct bt_conn *conn, bt_security_t level,
|
|||
if (eatt_err < 0) {
|
||||
BT_WARN("Automatic creation of EATT bearers failed on "
|
||||
"connection %s with error %d",
|
||||
bt_addr_le_str_real(bt_conn_get_dst(conn)), eatt_err);
|
||||
bt_addr_le_str(bt_conn_get_dst(conn)), eatt_err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue