summaryrefslogtreecommitdiff
path: root/tests/fs-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fs-tests')
-rw-r--r--tests/fs-tests/integrity/integck.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index e64af9d..517c46d 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -490,9 +490,10 @@ static size_t file_write_data( struct file_info *file,
written = BUFFER_SIZE;
while (remains) {
/* Fill up buffer with random data */
- if (written < BUFFER_SIZE)
+ if (written < BUFFER_SIZE) {
memmove(buf, buf + written, BUFFER_SIZE - written);
- else
+ written = BUFFER_SIZE - written;
+ } else
written = 0;
for (; written < BUFFER_SIZE; ++written)
buf[written] = rand();