Commit e10989ae authored by Benjamin REIS's avatar Benjamin REIS

C99

parent 6bf440e9
......@@ -57,6 +57,9 @@ void bctoolbox_tester_before_each() {
}
int bctoolbox_tester_set_log_file(const char *filename) {
BctoolboxLogHandler* filehandler;
char dirbuffer[512];
char basebuffer[512];
if (log_file) {
fclose(log_file);
}
......@@ -66,7 +69,7 @@ int bctoolbox_tester_set_log_file(const char *filename) {
return -1;
}
bctbx_message("Redirecting traces to file [%s]", filename);
BctoolboxLogHandler* filehandler = bctbx_create_file_log_handler(0, dirname(filename), basename(filename), log_file);
filehandler = bctbx_create_file_log_handler(0, dirname_r(filename, dirbuffer), basename_r(filename, basebuffer), log_file);
bctbx_add_log_handler(filehandler);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment