projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a valgrind warning in unit test runner.
[apps/pfixtools.git]
/
postlicyd
/
tst-filters.c
diff --git
a/postlicyd/tst-filters.c
b/postlicyd/tst-filters.c
index
1a8db8b
..
4dcbaa8
100644
(file)
--- a/
postlicyd/tst-filters.c
+++ b/
postlicyd/tst-filters.c
@@
-62,6
+62,8
@@
static char *read_query(const char *basepath, const char *filename,
if (end != NULL) {
*end = buff + (map.end - map.map);
**end = '\0';
if (end != NULL) {
*end = buff + (map.end - map.map);
**end = '\0';
+ } else {
+ buff[map.end - map.map] = '\0';
}
file_map_close(&map);
}
}
file_map_close(&map);
}
@@
-200,8
+202,8
@@
int main(int argc, char *argv[])
#define RM(File) \
snprintf(path, FILENAME_MAX, "%s/%s", basepath, File); \
unlink(path);
#define RM(File) \
snprintf(path, FILENAME_MAX, "%s/%s", basepath, File); \
unlink(path);
- RM("test1_greylist.db");
- RM("test1_whitelist.db");
+
//
RM("test1_greylist.db");
+
//
RM("test1_whitelist.db");
RM("test2_greylist.db");
RM("test2_whitelist.db");
#undef RM
RM("test2_greylist.db");
RM("test2_whitelist.db");
#undef RM