X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Ftst-filters.c;h=4dcbaa8d7d6edd1037e75d18f16e318160668626;hb=5f78206a0829d7778a1810feecfe13917d1e6d1f;hp=1a8db8ba30bcb60acfaced395ce4336a6464a30f;hpb=b03c9cfcc3d0080c0467493ac1693465dd2d0e60;p=apps%2Fpfixtools.git diff --git a/postlicyd/tst-filters.c b/postlicyd/tst-filters.c index 1a8db8b..4dcbaa8 100644 --- 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'; + } else { + buff[map.end - map.map] = '\0'; } 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); - 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