Remove unnecessary mxs_log_flush_sync calls

The calls were unnecessary in the context where they were made.
This commit is contained in:
Markus Mäkelä
2018-08-10 15:06:59 +03:00
parent cb990f28dc
commit 70fa300fe1
10 changed files with 0 additions and 37 deletions

View File

@ -159,7 +159,6 @@ int main(int argc, char **argv)
printf("ERROR: Failed to open binlog file %s: %s.\n",
path, strerror(errno));
MXS_FREE(inst);
mxs_log_flush_sync();
mxs_log_finish();
exit(EXIT_FAILURE);
}
@ -186,7 +185,6 @@ int main(int argc, char **argv)
if (set_encryption_options(inst, key_file, aes_algo))
{
MXS_FREE(inst);
mxs_log_flush_sync();
mxs_log_finish();
exit(EXIT_FAILURE);
}
@ -203,21 +201,16 @@ int main(int argc, char **argv)
blr_read_events_all_events(inst, &binlog_file, BLR_CHECK_ONLY);
binlog_file.fix = true;
mxs_log_flush_sync();
}
/* Now read/check/fix the binary log */
int ret = blr_read_events_all_events(inst, &binlog_file, debug_out | report_header);
mxs_log_flush_sync();
MXS_NOTICE("Check retcode: %i, Binlog Pos = %lu", ret, inst->binlog_position);
close(inst->binlog_fd);
MXS_FREE(inst);
mxs_log_flush_sync();
mxs_log_finish();
return ret;

View File

@ -162,7 +162,6 @@ int main(int argc, char **argv)
inst = static_cast<ROUTER_INSTANCE*>(MXS_CALLOC(1, sizeof(ROUTER_INSTANCE)));
if (inst == NULL)
{
mxs_log_flush_sync();
mxs_log_finish();
return 1;
@ -884,7 +883,6 @@ int main(int argc, char **argv)
return 1;
}
mxs_log_flush_sync();
mxs_log_finish();
MXS_FREE(inst->user);
MXS_FREE(inst->password);