localtime 1.75

This commit is contained in:
Corinna Vinschen 2020-04-28 20:56:16 +02:00
parent 3f0c2ac96e
commit 65bf580752
1 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: localtime.c,v 1.74 2013/07/17 20:13:04 christos Exp $ */
/* $NetBSD: localtime.c,v 1.75 2013/07/17 23:09:26 christos Exp $ */
/*
** This file is in the public domain, so clarified as of
@ -82,6 +82,11 @@ static char privatehid[] = "@(#)private.h 7.48";
# define ATTRIBUTE_PURE /* empty */
#endif
#endif
#if 0
static char elsieid[] = "@(#)localtime.cc 8.17";
#else
__RCSID("$NetBSD: localtime.c,v 1.75 2013/07/17 23:09:26 christos Exp $");
#endif
/*
** Finally, some convenience items.
@ -1919,7 +1924,7 @@ offtime(const time_t *const timep, long offset)
struct tm *tmp;
if ((offset > 0 && offset > INT_FAST32_MAX) ||
(offset < 0 && offset > INT_FAST32_MIN)) {
(offset < 0 && offset < INT_FAST32_MIN)) {
errno = EOVERFLOW;
return NULL;
}
@ -2517,7 +2522,7 @@ timeoff(struct tm *const tmp, long offset)
time_t t;
if ((offset > 0 && offset > INT_FAST32_MAX) ||
(offset < 0 && offset > INT_FAST32_MIN)) {
(offset < 0 && offset < INT_FAST32_MIN)) {
errno = EOVERFLOW;
return -1;
}