Bluetooth: Mesh: beacon: Remove unnecessary #ifdefs
Static variables and functions don't need #ifdefs if the code calling them is using IS_ENABLED(). If IS_ENABLED() evaluates to false the compiler will strip out all the static entities. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
71283c6c9b
commit
84847f5c6d
1 changed files with 1 additions and 4 deletions
|
@ -151,7 +151,6 @@ static int secure_beacon_send(void)
|
||||||
|
|
||||||
static int unprovisioned_beacon_send(void)
|
static int unprovisioned_beacon_send(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_BT_MESH_PB_ADV)
|
|
||||||
const struct bt_mesh_prov *prov;
|
const struct bt_mesh_prov *prov;
|
||||||
u8_t uri_hash[16] = { 0 };
|
u8_t uri_hash[16] = { 0 };
|
||||||
struct net_buf *buf;
|
struct net_buf *buf;
|
||||||
|
@ -203,7 +202,6 @@ static int unprovisioned_beacon_send(void)
|
||||||
net_buf_unref(buf);
|
net_buf_unref(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_BT_MESH_PB_ADV */
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,11 +251,10 @@ static void beacon_send(struct k_work *work)
|
||||||
k_delayed_work_submit(&beacon_timer,
|
k_delayed_work_submit(&beacon_timer,
|
||||||
PROVISIONED_INTERVAL);
|
PROVISIONED_INTERVAL);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV)) {
|
||||||
unprovisioned_beacon_send();
|
unprovisioned_beacon_send();
|
||||||
k_delayed_work_submit(&beacon_timer, UNPROVISIONED_INTERVAL);
|
k_delayed_work_submit(&beacon_timer, UNPROVISIONED_INTERVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void secure_beacon_recv(struct net_buf_simple *buf)
|
static void secure_beacon_recv(struct net_buf_simple *buf)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue