Source-Changes-HG archive

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

[src/netbsd-7]: src/lib/libc/time Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/028bcb4060eb
branches:  netbsd-7
changeset: 799887:028bcb4060eb
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Apr 29 18:53:11 2016 +0000

description:
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.

diffstat:

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

diffs (27 lines):

diff -r 5fa6c6175032 -r 028bcb4060eb lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Sat Apr 16 21:00:49 2016 +0000
+++ b/lib/libc/time/localtime.c Fri Apr 29 18:53:11 2016 +0000
@@ -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 @@
 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)



Home | Main Index | Thread Index | Old Index