Skip to content

Commit

Permalink
Fix building on older gcc versions (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
3cky committed Dec 27, 2023
1 parent 3bed375 commit 5b59f5b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ main(int argc, char *argv[])
char *exename;
char ttyparity;
char *end;
char *logfilenamevalue;
char *logfilename;

sig_init();

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5b59f5b

Please sign in to comment.