nimble/gatts: Fix use of uninitialized variable

new_notification was set to 1 only on complete iteration of loop. If
ble_hs_conn_find_by_idx would return NULL on first iteration it would
be used uninitialized

X-Original-Commit: 3f1ea82ac4ef1043f595ccc7ded14d57279efa62
This commit is contained in:
Szymon Janc
2017-01-30 17:03:15 +01:00
parent bb977042e5
commit 73ef029935
+1 -1
View File
@@ -1443,7 +1443,7 @@ ble_gatts_chr_updated(uint16_t chr_val_handle)
struct ble_store_key_cccd cccd_key;
struct ble_gatts_clt_cfg *clt_cfg;
struct ble_hs_conn *conn;
int new_notifications;
int new_notifications = 0;
int clt_cfg_idx;
int persist;
int rc;