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