mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-01 12:26:38 -05:00
More coverage test.
This commit is contained in:
parent
cabe782a6f
commit
ba0c979c11
9 changed files with 88 additions and 17 deletions
4
elem.c
4
elem.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue