File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
lib/sdk11/components/ble/ble_services/ble_dfu Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ uint32_t ble_dfu_init(ble_dfu_t * p_dfu, ble_dfu_init_t * p_dfu_init)
463
463
464
464
p_dfu -> conn_handle = BLE_CONN_HANDLE_INVALID ;
465
465
466
- ble_uuid_t service_uuid ;
466
+ ble_uuid_t service_uuid = { 0 } ;
467
467
uint32_t err_code ;
468
468
469
469
const ble_uuid128_t base_uuid128 =
Original file line number Diff line number Diff line change @@ -414,14 +414,16 @@ uint32_t proc_ble(void)
414
414
__ALIGN (4 ) uint8_t ev_buf [ BLE_EVT_LEN_MAX (BLEGATT_ATT_MTU_MAX ) ];
415
415
uint16_t ev_len = BLE_EVT_LEN_MAX (BLEGATT_ATT_MTU_MAX );
416
416
417
+ // Init header
418
+ ble_evt_t * evt = (ble_evt_t * ) ev_buf ;
419
+ evt -> header .evt_id = BLE_EVT_INVALID ;
420
+
417
421
// Get BLE Event
418
422
uint32_t err = sd_ble_evt_get (ev_buf , & ev_len );
419
423
420
424
// Handle valid event, ignore error
421
425
if ( NRF_SUCCESS == err )
422
426
{
423
- ble_evt_t * evt = (ble_evt_t * ) ev_buf ;
424
-
425
427
switch (evt -> header .evt_id )
426
428
{
427
429
case BLE_GAP_EVT_CONNECTED :
@@ -448,7 +450,7 @@ uint32_t proc_ble(void)
448
450
// process SOC event from SD
449
451
uint32_t proc_soc (void )
450
452
{
451
- uint32_t soc_evt ;
453
+ uint32_t soc_evt = 0 ;
452
454
uint32_t err = sd_evt_get (& soc_evt );
453
455
454
456
if (NRF_SUCCESS == err )
You can’t perform that action at this time.
0 commit comments