pkarashchenko commented on code in PR #5992:
URL: https://github.com/apache/incubator-nuttx/pull/5992#discussion_r843867339
##########
sched/sched/sched_note.c:
##########
@@ -122,18 +123,17 @@ static inline void sched_note_flatten(FAR uint8_t *dst,
{
#ifdef CONFIG_HAVE_LONG_LONG
case 8:
- dst[7] = (uint8_t)((*(uint64_t *)src >> 56) & 0xff);
- dst[6] = (uint8_t)((*(uint64_t *)src >> 48) & 0xff);
- dst[5] = (uint8_t)((*(uint64_t *)src >> 40) & 0xff);
- dst[4] = (uint8_t)((*(uint64_t *)src >> 32) & 0xff);
+ *(uint64_t *)dst = htole64(*(uint64_t *)src);
Review Comment:
Are we sure that `dst` points to properly aligned memory?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]