stop duplicate parsing of arguments

This commit is contained in:
Enno Rehling 2016-01-31 21:36:01 +01:00
parent 8f4e6475c7
commit 3e57b19d62
2 changed files with 0 additions and 8 deletions

View File

@ -288,10 +288,6 @@ int main(int argc, char **argv)
int err = 0; int err = 0;
lua_State *L; lua_State *L;
setup_signal_handler(); setup_signal_handler();
/* parse args once to read config file location */
if (parse_args(argc, argv, &err) != 0) {
return err;
}
/* ini file sets defaults for arguments*/ /* ini file sets defaults for arguments*/
parse_config(inifile); parse_config(inifile);
if (!global.inifile) { if (!global.inifile) {

View File

@ -236,7 +236,6 @@ void log_printf(FILE * io, const char *format, ...)
va_end(args); va_end(args);
} }
static FILE *logfile; static FILE *logfile;
void log_close(void) void log_close(void)
@ -257,9 +256,6 @@ void log_close(void)
void log_open(const char *filename) void log_open(const char *filename)
{ {
if (logfile) {
log_close();
}
log_rotate(filename, LOG_MAXBACKUPS); log_rotate(filename, LOG_MAXBACKUPS);
logfile = fopen(filename, "a"); logfile = fopen(filename, "a");
if (logfile) { if (logfile) {