Bluetooth: Controller: Fix uninitialized ad_len_chain variable
Fix uninitialized ad_len_chain variable. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
ca45155a23
commit
6c7c5bd5dd
1 changed files with 17 additions and 0 deletions
|
@ -403,6 +403,14 @@ uint8_t ll_adv_sync_ad_data_set(uint8_t handle, uint8_t op, uint8_t len,
|
||||||
|
|
||||||
/* No AD data overflow */
|
/* No AD data overflow */
|
||||||
ad_len_overflow = 0U;
|
ad_len_overflow = 0U;
|
||||||
|
|
||||||
|
/* No chain PDU.
|
||||||
|
* Note: Not required to assign as referencing
|
||||||
|
* is guarded by the fact that ad_len_overflow
|
||||||
|
* is zero; having the below to make compilers
|
||||||
|
* not complain of uninitialized variable.
|
||||||
|
*/
|
||||||
|
ad_len_chain = 0U;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -484,7 +492,16 @@ uint8_t ll_adv_sync_ad_data_set(uint8_t handle, uint8_t op, uint8_t len,
|
||||||
/* Proceed to add chain PDU */
|
/* Proceed to add chain PDU */
|
||||||
err = 0U;
|
err = 0U;
|
||||||
} else {
|
} else {
|
||||||
|
/* No AD data overflow */
|
||||||
ad_len_overflow = 0U;
|
ad_len_overflow = 0U;
|
||||||
|
|
||||||
|
/* No chain PDU.
|
||||||
|
* Note: Not required to assign as referencing is
|
||||||
|
* guarded by the fact that ad_len_overflow is zero;
|
||||||
|
* having the below to make compilers not complain of
|
||||||
|
* uninitialized variable.
|
||||||
|
*/
|
||||||
|
ad_len_chain = 0U;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BT_CTLR_ADV_SYNC_PDU_LINK */
|
#endif /* CONFIG_BT_CTLR_ADV_SYNC_PDU_LINK */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue