Avoids possible division by zero in the regression test.

This commit is contained in:
Andrea Mazzoleni 2014-07-11 18:48:49 +02:00
parent 8912ebd76d
commit 2a6ad5d1ff

View file

@ -64,7 +64,7 @@ void create_file(const char* path, int size)
/* LCOV_EXCL_STOP */
}
} else {
/* don't recreate a 0 file to avoid ZERO protection */
/* don't truncate files to 0 size to avoid ZERO file size protection */
++size;
}
@ -292,6 +292,9 @@ void damage(const char* path, int size)
/* LCOV_EXCL_STOP */
}
if (st.st_size == 0)
return;
if (S_ISREG(st.st_mode)) {
/* file */
FILE* f;