summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/common.c b/src/common.c
index 3e008f1..f013d51 100644
--- a/src/common.c
+++ b/src/common.c
@@ -241,11 +241,8 @@ int date_dos2unix(const unsigned short f_time, const unsigned short f_date)
void set_secwest(void)
{
- struct tm *tmptr;
- time_t t;
-
- t = time(NULL);
- tmptr = localtime(&t);
+ const time_t t = time(NULL);
+ const struct tm *tmptr = localtime(&t);
#ifdef HAVE_STRUCT_TM_TM_GMTOFF
secwest = -1 * tmptr->tm_gmtoff;
#elif defined (DJGPP) || defined(__ANDROID__)