Skip to content

Commit c5610f9

Browse files
kapi-noanangl
authored andcommitted
bluetooth: services: fast_pair: remove redundant references in storage
Removed unnecessary references of the Account Key list in the Fast Pair storage module. Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 45b8968 commit c5610f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

subsys/bluetooth/services/fast_pair/fp_storage.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static int fp_settings_set(const char *name, size_t len, settings_read_cb read_c
111111
return -EINVAL;
112112
}
113113

114-
memcpy(&account_key_list[index], data.account_key, sizeof(data.account_key));
114+
memcpy(account_key_list[index], data.account_key, sizeof(data.account_key));
115115
account_key_loaded_ids[index] = data.account_key_id;
116116

117117
return 0;
@@ -252,7 +252,7 @@ int fp_storage_account_key_save(const uint8_t *account_key)
252252
int err;
253253

254254
for (size_t i = 0; i < account_key_count; i++) {
255-
if (!memcmp(account_key, &account_key_list[i], FP_CRYPTO_ACCOUNT_KEY_LEN)) {
255+
if (!memcmp(account_key, account_key_list[i], FP_CRYPTO_ACCOUNT_KEY_LEN)) {
256256
LOG_INF("Account Key already saved - skipping.");
257257
return 0;
258258
}
@@ -277,7 +277,7 @@ int fp_storage_account_key_save(const uint8_t *account_key)
277277
return err;
278278
}
279279

280-
memcpy(&account_key_list[index], account_key, FP_CRYPTO_ACCOUNT_KEY_LEN);
280+
memcpy(account_key_list[index], account_key, FP_CRYPTO_ACCOUNT_KEY_LEN);
281281

282282
account_key_next_id = next_key_id(account_key_next_id);
283283

0 commit comments

Comments
 (0)