Bluetooth: Fix coding style issues in LE address helper functions

Even one-line branches should have {}, and the last two return
statements can be simplified into a single one.

Change-Id: I0f65aeaba867240255eae8e1c461386700444ae6
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-11-27 20:41:26 +02:00
commit cb84ad1ad6

View file

@ -140,25 +140,21 @@ extern const struct bt_conn_auth_cb *bt_auth;
static inline bool bt_addr_le_is_rpa(const bt_addr_le_t *addr)
{
if (addr->type != BT_ADDR_LE_RANDOM)
if (addr->type != BT_ADDR_LE_RANDOM) {
return false;
}
if ((addr->a.val[5] & 0xc0) == 0x40)
return true;
return false;
return ((addr->a.val[5] & 0xc0) == 0x40);
}
static inline bool bt_addr_le_is_identity(const bt_addr_le_t *addr)
{
if (addr->type == BT_ADDR_LE_PUBLIC)
if (addr->type == BT_ADDR_LE_PUBLIC) {
return true;
}
/* Check for Random Static address type */
if ((addr->a.val[5] & 0xc0) == 0xc0)
return true;
return false;
return ((addr->a.val[5] & 0xc0) == 0xc0);
}
static inline bool bt_le_conn_params_valid(uint16_t min, uint16_t max,