mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Ensures to always write not zero data in the regression test.
This commit is contained in:
parent
2a6ad5d1ff
commit
e4a4e20e8c
1 changed files with 3 additions and 3 deletions
|
|
@ -268,7 +268,7 @@ void writ(const char* path, int size)
|
||||||
/* write garbage, in case also over the end */
|
/* write garbage, in case also over the end */
|
||||||
count = size;
|
count = size;
|
||||||
while (count) {
|
while (count) {
|
||||||
fputc(rnd(256), f);
|
fputc(rndnotzero(256), f);
|
||||||
--count;
|
--count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -347,7 +347,7 @@ void damage(const char* path, int size)
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
c = rnd(256);
|
c = rndnotzero(256);
|
||||||
} while (c == data[i]);
|
} while (c == data[i]);
|
||||||
|
|
||||||
data[i] = c;
|
data[i] = c;
|
||||||
|
|
@ -410,7 +410,7 @@ void append(const char* path, int size)
|
||||||
/* write garbage, in case also over the end */
|
/* write garbage, in case also over the end */
|
||||||
count = rnd(size);
|
count = rnd(size);
|
||||||
while (count) {
|
while (count) {
|
||||||
fputc(rnd(256), f);
|
fputc(rndnotzero(256), f);
|
||||||
--count;
|
--count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue