Fix building on older gcc versions (#100)

This commit is contained in:
Victor Antonovich 2023-12-27 13:30:47 +03:00
parent 3bed375c44
commit 5b59f5b92f
1 changed files with 4 additions and 2 deletions

View File

@ -178,6 +178,8 @@ main(int argc, char *argv[])
char *exename;
char ttyparity;
char *end;
char *logfilenamevalue;
char *logfilename;
sig_init();
@ -260,8 +262,8 @@ main(int argc, char *argv[])
}
break;
case 'L':
char *logfilenamevalue = strdup(optarg);
char *logfilename = util_trim(logfilenamevalue);
logfilenamevalue = strdup(optarg);
logfilename = util_trim(logfilenamevalue);
if (!strlen(logfilename))
{ /* report about empty log file */
printf("%s: -L: log file name is empty, exiting...\n", exename);