about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LYMain.c10
-rw-r--r--src/parsdate.c14
-rw-r--r--src/parsdate.y10
3 files changed, 17 insertions, 17 deletions
diff --git a/src/LYMain.c b/src/LYMain.c
index 36c22ed5..7c8eca0e 100644
--- a/src/LYMain.c
+++ b/src/LYMain.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYMain.c,v 1.282 2018/07/08 15:22:44 tom Exp $
+ * $LynxId: LYMain.c,v 1.283 2018/12/28 14:21:31 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTTP.h>
@@ -2361,9 +2361,9 @@ void reload_read_cfg(void)
 	FREE(tempfile);
 	return;			/* can not write the very own file :( */
     }
+#ifdef USE_PERSISTENT_COOKIES
     if (LYCookieFile != 0 && LYCookieSaveFile != 0) {
 	/* set few safe flags: */
-#ifdef USE_PERSISTENT_COOKIES
 	BOOLEAN persistent_cookies_flag = persistent_cookies;
 	char *LYCookieFile_flag = NULL;
 	char *LYCookieSaveFile_flag = NULL;
@@ -2372,8 +2372,6 @@ void reload_read_cfg(void)
 	    StrAllocCopy(LYCookieFile_flag, LYCookieFile);
 	    StrAllocCopy(LYCookieSaveFile_flag, LYCookieSaveFile);
 	}
-#endif
-
 #ifdef USE_CHARSET_CHOICE
 	custom_assumed_doc_charset = FALSE;
 	custom_display_charset = FALSE;
@@ -2414,7 +2412,6 @@ void reload_read_cfg(void)
 	 * a major problem: file paths
 	 * like lynx_save_space, LYCookieFile etc.
 	 */
-#ifdef USE_PERSISTENT_COOKIES
 	/* restore old settings */
 	if (persistent_cookies != persistent_cookies_flag) {
 	    persistent_cookies = persistent_cookies_flag;
@@ -2434,9 +2431,8 @@ void reload_read_cfg(void)
 	    FREE(LYCookieFile_flag);
 	    FREE(LYCookieSaveFile_flag);
 	}
-#endif
-
     }
+#endif /* USE_PERSISTENT_COOKIES */
 }
 #endif /* !NO_CONFIG_INFO */
 
diff --git a/src/parsdate.c b/src/parsdate.c
index d4a71afd..d0e772f1 100644
--- a/src/parsdate.c
+++ b/src/parsdate.c
@@ -22,7 +22,7 @@
 #include <LYLeaks.h>
 
 /*
- *  $LynxId: parsdate.c,v 1.26 2018/12/27 22:31:48 tom Exp $
+ *  $LynxId: parsdate.c,v 1.27 2018/12/28 01:54:18 tom Exp $
  *
  *  This module is adapted and extended from tin, to use for LYmktime().
  *
@@ -672,10 +672,12 @@ static time_t Convert(time_t Month, time_t Day, time_t Year, time_t Hours,
     } else if (dst == DSTmaybe) {
 	struct tm *tm = localtime(&tod);
 
-	if (tm != NULL && tm->tm_isdst)
-	    Julian -= DST_OFFSET * 60 * 60;
-	else
+	if (tm != NULL) {
+	    if (tm->tm_isdst)
+		Julian -= DST_OFFSET * 60 * 60;
+	} else {
 	    Julian = BAD_TIME;
+	}
     }
     return Julian;
 }
@@ -1039,7 +1041,7 @@ time_t parsedate(char *p,
      * from the error return value.  (Alternately could set errno on error.) */
     return (Start == BAD_TIME) ? 0 : Start;
 }
-#line 1043 "y.tab.c"
+#line 1045 "y.tab.c"
 
 #if YYDEBUG
 #include <stdio.h>	/* needed for printf */
@@ -1524,7 +1526,7 @@ case 35:
 	    yyval.Meridian = yystack.l_mark[0].Meridian;
 	}
 break;
-#line 1528 "y.tab.c"
+#line 1530 "y.tab.c"
     }
     yystack.s_mark -= yym;
     yystate = *yystack.s_mark;
diff --git a/src/parsdate.y b/src/parsdate.y
index 182e6a0d..374a87c1 100644
--- a/src/parsdate.y
+++ b/src/parsdate.y
@@ -3,7 +3,7 @@
 #include <LYLeaks.h>
 
 /*
- *  $LynxId: parsdate.y,v 1.28 2018/12/27 21:56:01 tom Exp $
+ *  $LynxId: parsdate.y,v 1.29 2018/12/28 01:53:17 tom Exp $
  *
  *  This module is adapted and extended from tin, to use for LYmktime().
  *
@@ -612,10 +612,12 @@ static time_t Convert(time_t Month, time_t Day, time_t Year, time_t Hours,
     } else if (dst == DSTmaybe) {
 	struct tm *tm = localtime(&tod);
 
-	if (tm != NULL && tm->tm_isdst)
-	    Julian -= DST_OFFSET * 60 * 60;
-	else
+	if (tm != NULL) {
+	    if (tm->tm_isdst)
+		Julian -= DST_OFFSET * 60 * 60;
+	} else {
 	    Julian = BAD_TIME;
+	}
     }
     return Julian;
 }