Module Name:    src
Committed By:   snj
Date:           Fri Apr 29 18:53:11 UTC 2016

Modified Files:
        src/lib/libc/time [netbsd-7]: localtime.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1146):
        lib/libc/time/localtime.c: revision 1.103 via patch
Use the correct upper bounds for the types array.  The correct upper
bound is typecnt not timecnt.  Now perpetual 'standard' time zones
will work correctly as they have a typecnt of 1 but a timecnt of 0.


To generate a diff of this commit:
cvs rdiff -u -r1.82.2.2 -r1.82.2.3 src/lib/libc/time/localtime.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.82.2.2 src/lib/libc/time/localtime.c:1.82.2.3
--- src/lib/libc/time/localtime.c:1.82.2.2	Sun Mar  6 18:01:48 2016
+++ src/lib/libc/time/localtime.c	Fri Apr 29 18:53:11 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: localtime.c,v 1.82.2.2 2016/03/06 18:01:48 martin Exp $	*/
+/*	$NetBSD: localtime.c,v 1.82.2.3 2016/04/29 18:53:11 snj Exp $	*/
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char	elsieid[] = "@(#)localtime.c	8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.82.2.2 2016/03/06 18:01:48 martin Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.82.2.3 2016/04/29 18:53:11 snj Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -255,7 +255,7 @@ const char *
 tzgetname(const timezone_t sp, int isdst)
 {
 	int i;
-	for (i = 0; i < sp->timecnt; ++i) {
+	for (i = 0; i < sp->typecnt; ++i) {
 		const struct ttinfo *const ttisp = &sp->ttis[sp->types[i]];
 
 		if (ttisp->tt_isdst == isdst)

Reply via email to