strace/tests/fill_memory.c
Eugene Syromyatnikov 06934669ea tests: move fill_memory and fill_memory_ex into a separate file
* tests/fill_memory.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
* tests/quotactl.h (fill_memory, fill_memory_ex): Move to fill_memory.c.
* tests/tests.h (fill_memory, fill_memory_ex): New prototypes.
2016-10-26 01:06:09 +00:00

19 lines
281 B
C

#include "tests.h"
void
fill_memory_ex(char *ptr, size_t size, unsigned char start,
unsigned char period)
{
size_t i;
for (i = 0; i < size; i++) {
ptr[i] = start + i % period;
}
}
void
fill_memory(char *ptr, size_t size)
{
fill_memory_ex(ptr, size, 0x80, 0x80);
}