Skip to content

Commit 62a22c6

Browse files
dhineshkumarmcciterrillmoore
authored andcommitted
replace constant 16 with sizeof data in the function call
1 parent 344867c commit 62a22c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/se/drivers/default/lmic_se_default.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ In this function the nwkskey is passed to upper layer of LMIC.
154154

155155
LMIC_SecureElement_Error_t
156156
LMIC_SecureElement_Default_getNwkSKey(LMIC_SecureElement_Aes128Key_t *pNwkSKey, LMIC_SecureElement_KeySelector_t iKey) {
157-
os_copyMem(pNwkSKey->bytes,s_nwkSKey.bytes, 16);
157+
os_copyMem(pNwkSKey->bytes, s_nwkSKey.bytes, sizeof(pNwkSKey->bytes));
158158
}
159159

160160
/*!
@@ -169,7 +169,7 @@ In this function the appskey is passed to upper layer of LMIC.
169169

170170
LMIC_SecureElement_Error_t
171171
LMIC_SecureElement_Default_getAppSKey(LMIC_SecureElement_Aes128Key_t *pAppSKey, LMIC_SecureElement_KeySelector_t iKey) {
172-
os_copyMem(pAppSKey->bytes,s_appSKey.bytes, 16);
172+
os_copyMem(pAppSKey->bytes, s_appSKey.bytes, sizeof(pAppSKey->bytes));
173173
}
174174

175175
// ================================================================================

0 commit comments

Comments
 (0)