diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2007-11-13 12:38:00 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-06-16 18:02:31 +0300 |
commit | 8dc67be0f1c7cab9a8715e63593ffe6ccf297222 (patch) | |
tree | b692e0bf117190b22483aa3b8bc71b601c2568d8 /tests/fs-tests/integrity/integck.c | |
parent | 838b38dadd00252c04fa5d548223b3a38062fe96 (diff) |
fs-tests: fix bug in integrity test
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'tests/fs-tests/integrity/integck.c')
-rw-r--r-- | tests/fs-tests/integrity/integck.c | 5 |
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(); |