mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-09 07:02:20 -04:00
fw: Remove unnecessary memcpy() from putinthex()
Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
parent
b9c415f5d6
commit
b292c72534
1 changed files with 1 additions and 2 deletions
|
@ -112,9 +112,8 @@ void htif_puthex(uint8_t c)
|
||||||
|
|
||||||
void htif_putinthex(const uint32_t n)
|
void htif_putinthex(const uint32_t n)
|
||||||
{
|
{
|
||||||
uint8_t buf[4];
|
uint8_t *buf = (uint8_t *)&n;
|
||||||
|
|
||||||
memcpy(buf, &n, 4);
|
|
||||||
htif_puts("0x");
|
htif_puts("0x");
|
||||||
for (int i = 3; i > -1; i--) {
|
for (int i = 3; i > -1; i--) {
|
||||||
htif_puthex(buf[i]);
|
htif_puthex(buf[i]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue