More coverage test.

This commit is contained in:
Andrea Mazzoleni 2014-03-20 22:10:19 +01:00
parent cabe782a6f
commit ba0c979c11
9 changed files with 88 additions and 17 deletions

4
elem.c
View file

@ -85,8 +85,10 @@ struct snapraid_filter* filter_alloc_file(int direction, const char* pattern)
/* a slash must be the first char, as we reject PATH/DIR/FILE */
if (filter->pattern[0] != '/') {
/* LCOV_EXCL_START */
free(filter);
return 0;
/* LCOV_EXCL_STOP */
}
}
@ -108,8 +110,10 @@ struct snapraid_filter* filter_alloc_disk(int direction, const char* pattern)
/* no slash allowed in disk names */
if (strchr(filter->pattern, '/') != 0) {
/* LCOV_EXCL_START */
free(filter);
return 0;
/* LCOV_EXCL_STOP */
}
return filter;