Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/lib/libc/time Pull up revision 1.27 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/b741b84c2b06
branches:  netbsd-1-5
changeset: 491667:b741b84c2b06
user:      he <he%NetBSD.org@localhost>
date:      Sun May 06 17:42:39 2001 +0000

description:
Pull up revision 1.27 (requested by he):
  Prevent core dump on call to ctime() if TZ is set but empty.

diffstat:

 lib/libc/time/localtime.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 6be45018e2d5 -r b741b84c2b06 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Sun May 06 15:22:50 2001 +0000
+++ b/lib/libc/time/localtime.c Sun May 06 17:42:39 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.23 2000/01/22 22:19:21 mycroft Exp $   */
+/*     $NetBSD: localtime.c,v 1.23.4.1 2001/05/06 17:42:39 he Exp $    */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -11,7 +11,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    7.70";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.23 2000/01/22 22:19:21 mycroft Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.23.4.1 2001/05/06 17:42:39 he Exp $");
 #endif
 #endif /* !defined NOID */
 #endif /* !defined lint */
@@ -1041,6 +1041,8 @@
                */
                lclptr->leapcnt = 0;            /* so, we're off a little */
                lclptr->timecnt = 0;
+               lclptr->typecnt = 0;
+               lclptr->ttis[0].tt_isdst = 0;
                lclptr->ttis[0].tt_gmtoff = 0;
                lclptr->ttis[0].tt_abbrind = 0;
                (void)strncpy(lclptr->chars, gmt, sizeof(lclptr->chars) - 1);



Home | Main Index | Thread Index | Old Index