Module Name: src Committed By: ginsbach Date: Sat Aug 12 03:29:23 UTC 2017
Modified Files: src/lib/libc/time: strptime.c Log Message: Fix a couple comments and a spacing nit. - Change a XXX comment that no longer applies. - Add a clarifying comment. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/lib/libc/time/strptime.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/strptime.c diff -u src/lib/libc/time/strptime.c:1.60 src/lib/libc/time/strptime.c:1.61 --- src/lib/libc/time/strptime.c:1.60 Sun May 15 20:37:48 2016 +++ src/lib/libc/time/strptime.c Sat Aug 12 03:29:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.60 2016/05/15 20:37:48 christos Exp $ */ +/* $NetBSD: strptime.c,v 1.61 2017/08/12 03:29:23 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.60 2016/05/15 20:37:48 christos Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.61 2017/08/12 03:29:23 ginsbach Exp $"); #endif #include "namespace.h" @@ -382,10 +382,10 @@ literal: case 'U': /* The week of year, beginning on sunday. */ case 'W': /* The week of year, beginning on monday. */ /* - * XXX This is bogus, as we can not assume any valid + * This is bogus, as we can not assume any valid * information present in the tm structure at this - * point to calculate a real value, so just check the - * range for now. + * point to calculate a real value, so save the + * week for now in case it can be used later. */ bp = conv_num(bp, &i, 0, 53); LEGAL_ALT(ALT_O); @@ -516,7 +516,7 @@ namedzone: /* Nautical / Military style */ if (delim(bp[1]) && ((*bp >= 'A' && *bp <= 'I') || - (*bp >= 'L' && *bp <= 'Y'))) { + (*bp >= 'L' && *bp <= 'Y'))) { #ifdef TM_GMTOFF /* Argh! No 'J'! */ if (*bp >= 'A' && *bp <= 'I') @@ -635,6 +635,7 @@ loadzone: bp = zname; continue; } + /* ISO 8601 & RFC 3339 limit to 23:59 max */ if (offs >= (HOURSPERDAY * SECSPERHOUR)) goto out; if (neg)