mirror of
https://github.com/xboot/xrock.git
synced 2024-11-26 19:33:25 +08:00
[xrock]update some code
This commit is contained in:
parent
e2b7d851b7
commit
7484c825de
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
*.d
|
||||
*.o
|
||||
*.map
|
||||
*.exe
|
||||
*~
|
||||
|
||||
#
|
||||
|
2
main.c
2
main.c
@ -57,7 +57,7 @@ static void hexdump(uint32_t addr, void * buf, size_t len)
|
||||
|
||||
for(j = 0; j < len; j += 16)
|
||||
{
|
||||
printf("%08zx: ", addr + j);
|
||||
printf("%08x: ", (uint32_t)(addr + j));
|
||||
for(i = 0; i < 16; i++)
|
||||
{
|
||||
if(j + i < len)
|
||||
|
2
rock.c
2
rock.c
@ -224,7 +224,7 @@ static inline uint32_t make_tag(void)
|
||||
int i;
|
||||
|
||||
for(i = 0; i < 4; i++)
|
||||
tag = (tag << 8) | (random() & 0xff);
|
||||
tag = (tag << 8) | (rand() & 0xff);
|
||||
return tag;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user