[riot-notifications] [RIOT-OS/RIOT] FIDO2 support in RIOT (#16489)

Nils Ollrogge notifications at github.com
Fri Aug 27 10:33:01 CEST 2021


@Ollrogge commented on this pull request.



> +    uint8_t buf[CTAP_FLASH_STATE_SZ] = { 0 };
+
+    memcpy(buf, state, sizeof(*state));

At the moment this is unnecessary since `sizeof(*state)` == 160 which is aligned to `FLASHPAGE_WRITE_BLOCK_SIZE`. If the struct changes in the future however this would fail. 

I could add an `#ifdef` checking the alignment of the struct and then only using the buffer if the size is not aligned ?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16489#discussion_r697256390
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210827/fb5f2f4f/attachment.htm>


More information about the notifications mailing list