Skip to content
Snippets Groups Projects
Commit 355f4cad authored by Paul Fertser's avatar Paul Fertser
Browse files

Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *)


This helps to uncover incorrect usage when a pointer to uint32_t is
passed to those functions which leads to subtle bugs on BE systems.

The reason is that it's normally assumed that any uint32_t variable
holds its value in host byte order, but using but_set_u32 on it
silently does implicit pointer conversion to (void *) and the
assumption ends up broken without any indication.

Change-Id: I48ffd190583d8aa32ec1fef8f1cdc0b4184e4546
Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2467


Tested-by: jenkins
Reviewed-by: default avatarAndreas Fritiofson <andreas.fritiofson@gmail.com>
parent 9d745a06
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment