From 5b59f5b92faeac129d5b4dc27a75884b7cd69667 Mon Sep 17 00:00:00 2001 From: Victor Antonovich Date: Wed, 27 Dec 2023 13:30:47 +0300 Subject: [PATCH] Fix building on older gcc versions (#100) --- src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 24b521c..a833be2 100644 --- a/src/main.c +++ b/src/main.c @@ -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);