06934669ea
* 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.
19 lines
281 B
C
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);
|
|
}
|