Skip to content

Commit 3702f72

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Fix cte_info may be used uninitialized error
Fix cte_info may be used uninitialized compile error. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 7fff64f commit 3702f72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subsys/bluetooth/controller/ll_sw/ull_adv_sync.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,10 @@ uint8_t ull_adv_sync_pdu_set_clear(struct lll_adv_sync *lll_sync,
11931193
} else if (!(hdr_rem_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) &&
11941194
ter_hdr_prev.cte_info) {
11951195
ter_hdr.cte_info = 1;
1196+
cte_info = 0U; /* value not used, will be read from prev PDU */
11961197
ter_dptr += sizeof(struct pdu_cte_info);
1198+
} else {
1199+
cte_info = 0U; /* value not used */
11971200
}
11981201

11991202
/* If CTEInfo exists in prev PDU */

0 commit comments

Comments
 (0)