diff options
author | delphij <delphij@FreeBSD.org> | 2009-05-18 22:34:33 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-05-18 22:34:33 +0000 |
commit | 94241912dc47864055ebcbc3eed24cc0cdafc6f4 (patch) | |
tree | 337723a5b888e6f022d551b74c01b12f3a528fce /contrib/file/cdf_time.c | |
parent | 6048eaa315a3fd595e7f9f99cfcff0d39bdfab55 (diff) | |
parent | 862d9405b857dba35f8f2eb6d0623b9a552d4353 (diff) | |
download | FreeBSD-src-94241912dc47864055ebcbc3eed24cc0cdafc6f4.zip FreeBSD-src-94241912dc47864055ebcbc3eed24cc0cdafc6f4.tar.gz |
Merge vendor/file/dist@192348, bringing FILE 5.03 to 8-CURRENT.
Security: CVE-2009-1515
Diffstat (limited to 'contrib/file/cdf_time.c')
-rw-r--r-- | contrib/file/cdf_time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/file/cdf_time.c b/contrib/file/cdf_time.c index e531b2d..932253b 100644 --- a/contrib/file/cdf_time.c +++ b/contrib/file/cdf_time.c @@ -27,7 +27,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf_time.c,v 1.5 2009/02/03 20:27:51 christos Exp $") +FILE_RCSID("@(#)$File: cdf_time.c,v 1.6 2009/03/10 11:44:29 christos Exp $") #endif #include <time.h> @@ -102,6 +102,7 @@ cdf_timestamp_to_timespec(struct timespec *ts, cdf_timestamp_t t) #ifdef HAVE_STRUCT_TM_TM_ZONE static char UTC[] = "UTC"; #endif + int rdays; /* Unit is 100's of nanoseconds */ ts->tv_nsec = (t % CDF_TIME_PREC) * 100; @@ -119,7 +120,7 @@ cdf_timestamp_to_timespec(struct timespec *ts, cdf_timestamp_t t) // XXX: Approx tm.tm_year = CDF_BASE_YEAR + (t / 365); - int rdays = cdf_getdays(tm.tm_year); + rdays = cdf_getdays(tm.tm_year); t -= rdays; tm.tm_mday = cdf_getday(tm.tm_year, t); tm.tm_mon = cdf_getmonth(tm.tm_year, t); |