Skip memcpy in badrand
This commit is contained in:
parent
cb0ad6a2a5
commit
6e266e0905
1 changed files with 1 additions and 2 deletions
|
|
@ -30,8 +30,7 @@ void badrand_buf(char *buf, size_t len) {
|
||||||
unsigned char *p = (unsigned char *)buf;
|
unsigned char *p = (unsigned char *)buf;
|
||||||
|
|
||||||
while (len >= 8) {
|
while (len >= 8) {
|
||||||
uint64_t r = badrand();
|
*(uint64_t *)p = badrand();
|
||||||
memcpy(p, &r, 8);
|
|
||||||
p += 8;
|
p += 8;
|
||||||
len -= 8;
|
len -= 8;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue