Beautify fill_buffer()

This is completely pointless and speeds up the tests by something
like 4% (less than a second), but my eyes BLEED when I see the
existing code.

Change-Id: Ia1d163e99bd2a2c2196b2669e4faa8707dbfc8d3
This commit is contained in:
Pete Zaitcev 2016-10-14 22:41:18 -06:00
parent cb0daba975
commit 169a457198
1 changed files with 2 additions and 3 deletions

View File

@ -144,10 +144,9 @@ out:
static void fill_buffer(char *buf, size_t size, int seed)
{
size_t i;
buf[0] = seed;
for (i=1; i < size; i++) {
buf[i] = ((buf[i-1] + i) % 256);
for (i=0; i < size; i++) {
buf[i] = (seed += i);
}
}