style: tests: comply with MISRA C:2012 Rule 15.6

Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
Pisit Sawangvonganan 2024-08-16 13:35:07 +07:00 committed by Henrik Brix Andersen
commit b7d55d8ec6
8 changed files with 26 additions and 13 deletions

View file

@ -127,8 +127,9 @@ void service_b_3_1_remove(void)
*/
void service_b_3_1_value_v6_notify(void)
{
if (!value_v6_ntf_active)
if (!value_v6_ntf_active) {
return;
}
bt_gatt_notify(NULL, &service_b_3_1_attrs[1], &value_v6_value,
sizeof(value_v6_value));

View file

@ -131,8 +131,9 @@ void service_b_3_2_remove(void)
*/
void service_b_3_2_value_v6_notify(void)
{
if (!value_v6_ntf_active)
if (!value_v6_ntf_active) {
return;
}
bt_gatt_notify(NULL, &service_b_3_2_attrs[1], &value_v6_value,
sizeof(value_v6_value));
@ -160,8 +161,9 @@ static void value_v6_indicate_cb(struct bt_conn *conn,
*/
void service_b_3_2_value_v6_indicate(void)
{
if (!value_v6_ind_active)
if (!value_v6_ind_active) {
return;
}
/*
* NOTE: Zephyr doesn't automatically bump up the attribute pointer for
* indications as it does for notifications.

View file

@ -131,8 +131,9 @@ void service_b_3_3_remove(void)
*/
void service_b_3_3_value_v6_notify(void)
{
if (!value_v6_ntf_active)
if (!value_v6_ntf_active) {
return;
}
bt_gatt_notify(NULL, &service_b_3_3_attrs[1], &value_v6_value,
sizeof(value_v6_value));
@ -160,8 +161,9 @@ static void value_v6_indicate_cb(struct bt_conn *conn,
*/
void service_b_3_3_value_v6_indicate(void)
{
if (!value_v6_ind_active)
if (!value_v6_ind_active) {
return;
}
/*
* NOTE: Zephyr doesn't automatically bump up the attribute pointer for
* indications as it does for notifications.