summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/dns/time.c
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2012-04-05 04:29:35 +0000
committerdougb <dougb@FreeBSD.org>2012-04-05 04:29:35 +0000
commit0adb91c0ac8b4cb02cf5b6c0214cfbaed14c3ca7 (patch)
treecf3176c0801c94a4f298353cc450f10cf1aae9c0 /contrib/bind9/lib/dns/time.c
parentcc55f4943b841b3772901d62a327ad4f9edb2c95 (diff)
downloadFreeBSD-src-0adb91c0ac8b4cb02cf5b6c0214cfbaed14c3ca7.zip
FreeBSD-src-0adb91c0ac8b4cb02cf5b6c0214cfbaed14c3ca7.tar.gz
Update to version 9.8.2, the latest from ISC, which contains numerous bug fixes.
Diffstat (limited to 'contrib/bind9/lib/dns/time.c')
-rw-r--r--contrib/bind9/lib/dns/time.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/bind9/lib/dns/time.c b/contrib/bind9/lib/dns/time.c
index a20a936..0f245a2 100644
--- a/contrib/bind9/lib/dns/time.c
+++ b/contrib/bind9/lib/dns/time.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2009-2011 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2009-2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.35.132.2 2011-03-09 23:46:55 tbox Exp $ */
+/* $Id$ */
/*! \file */
@@ -103,8 +103,8 @@ dns_time64_totext(isc_int64_t t, isc_buffer_t *target) {
return (ISC_R_SUCCESS);
}
-isc_result_t
-dns_time32_totext(isc_uint32_t value, isc_buffer_t *target) {
+isc_int64_t
+dns_time64_from32(isc_uint32_t value) {
isc_stdtime_t now;
isc_int64_t start;
isc_int64_t t;
@@ -121,7 +121,13 @@ dns_time32_totext(isc_uint32_t value, isc_buffer_t *target) {
t = start + (value - now);
else
t = start - (now - value);
- return (dns_time64_totext(t, target));
+
+ return (t);
+}
+
+isc_result_t
+dns_time32_totext(isc_uint32_t value, isc_buffer_t *target) {
+ return (dns_time64_totext(dns_time64_from32(value), target));
}
isc_result_t
OpenPOWER on IntegriCloud