anchao commented on code in PR #1126:
URL:
https://github.com/apache/incubator-nuttx-apps/pull/1126#discussion_r843998968
##########
system/sched_note/note_main.c:
##########
@@ -94,18 +95,17 @@ static void trace_dump_unflatten(FAR void *dst,
{
#ifdef CONFIG_HAVE_LONG_LONG
case 8:
- *(uint64_t *)dst = ((uint64_t)src[7] << 56)
- + ((uint64_t)src[6] << 48)
- + ((uint64_t)src[5] << 40)
- + ((uint64_t)src[4] << 32);
+ *(uint64_t *)dst = le64toh(*(uint64_t *)src);
Review Comment:
Yes, there are potential issues if the hardware do not support aligned
access, seems there is no more elegant way, I used the scheme you recommended.
--
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]