diff options
| author | 2020-01-09 18:17:14 +0000 | |
|---|---|---|
| committer | 2020-01-09 18:17:14 +0000 | |
| commit | efcc66dac05750a3e8f785336e18c8db46f7c4de (patch) | |
| tree | ee735efb62359255257c388aec982c7b35c2a91c /usr.sbin/bind/lib/isc/unix/time.c | |
| parent | We use __dead for functions that do not return. (diff) | |
| download | wireguard-openbsd-efcc66dac05750a3e8f785336e18c8db46f7c4de.tar.xz wireguard-openbsd-efcc66dac05750a3e8f785336e18c8db46f7c4de.zip | |
Use normal int types like int32_t instead of isc_int32_t.
OK millert
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix/time.c')
| -rw-r--r-- | usr.sbin/bind/lib/isc/unix/time.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/time.c b/usr.sbin/bind/lib/isc/unix/time.c index 056c35cbcdb..d741d6eeb52 100644 --- a/usr.sbin/bind/lib/isc/unix/time.c +++ b/usr.sbin/bind/lib/isc/unix/time.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.8 2020/01/09 13:47:14 florian Exp $ */ +/* $Id: time.c,v 1.9 2020/01/09 18:17:19 florian Exp $ */ /*! \file */ @@ -56,8 +56,8 @@ *** Intervals ***/ -static const isc_interval_t zero_interval = { 0, 0 }; -const isc_interval_t * const isc_interval_zero = &zero_interval; +static const interval_t zero_interval = { 0, 0 }; +const interval_t * const interval_zero = &zero_interval; #if ISC_FIX_TV_USEC static inline void @@ -86,7 +86,7 @@ fix_tv_usec(struct timeval *tv) { #endif void -isc_interval_set(isc_interval_t *i, +interval_set(interval_t *i, unsigned int seconds, unsigned int nanoseconds) { REQUIRE(i != NULL); @@ -97,7 +97,7 @@ isc_interval_set(isc_interval_t *i, } isc_boolean_t -isc_interval_iszero(const isc_interval_t *i) { +interval_iszero(const interval_t *i) { REQUIRE(i != NULL); INSIST(i->nanoseconds < NS_PER_S); @@ -187,7 +187,7 @@ isc_time_now(isc_time_t *t) { } isc_result_t -isc_time_nowplusinterval(isc_time_t *t, const isc_interval_t *i) { +isc_time_nowplusinterval(isc_time_t *t, const interval_t *i) { struct timeval tv; char strbuf[ISC_STRERRORSIZE]; @@ -254,7 +254,7 @@ isc_time_compare(const isc_time_t *t1, const isc_time_t *t2) { } isc_result_t -isc_time_add(const isc_time_t *t, const isc_interval_t *i, isc_time_t *result) +isc_time_add(const isc_time_t *t, const interval_t *i, isc_time_t *result) { REQUIRE(t != NULL && i != NULL && result != NULL); INSIST(t->nanoseconds < NS_PER_S && i->nanoseconds < NS_PER_S); @@ -280,7 +280,7 @@ isc_time_add(const isc_time_t *t, const isc_interval_t *i, isc_time_t *result) } isc_result_t -isc_time_subtract(const isc_time_t *t, const isc_interval_t *i, +isc_time_subtract(const isc_time_t *t, const interval_t *i, isc_time_t *result) { REQUIRE(t != NULL && i != NULL && result != NULL); @@ -303,15 +303,15 @@ isc_time_subtract(const isc_time_t *t, const isc_interval_t *i, return (ISC_R_SUCCESS); } -isc_uint64_t +uint64_t isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) { - isc_uint64_t i1, i2, i3; + uint64_t i1, i2, i3; REQUIRE(t1 != NULL && t2 != NULL); INSIST(t1->nanoseconds < NS_PER_S && t2->nanoseconds < NS_PER_S); - i1 = (isc_uint64_t)t1->seconds * NS_PER_S + t1->nanoseconds; - i2 = (isc_uint64_t)t2->seconds * NS_PER_S + t2->nanoseconds; + i1 = (uint64_t)t1->seconds * NS_PER_S + t1->nanoseconds; + i2 = (uint64_t)t2->seconds * NS_PER_S + t2->nanoseconds; if (i1 <= i2) return (0); @@ -326,12 +326,12 @@ isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) { return (i3); } -isc_uint32_t +uint32_t isc_time_seconds(const isc_time_t *t) { REQUIRE(t != NULL); INSIST(t->nanoseconds < NS_PER_S); - return ((isc_uint32_t)t->seconds); + return ((uint32_t)t->seconds); } isc_result_t @@ -360,8 +360,8 @@ isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp) { */ seconds = (time_t)t->seconds; - INSIST(sizeof(unsigned int) == sizeof(isc_uint32_t)); - INSIST(sizeof(time_t) >= sizeof(isc_uint32_t)); + INSIST(sizeof(unsigned int) == sizeof(uint32_t)); + INSIST(sizeof(time_t) >= sizeof(uint32_t)); if (t->seconds > (~0U>>1) && seconds <= (time_t)(~0U>>1)) return (ISC_R_RANGE); @@ -371,13 +371,13 @@ isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp) { return (ISC_R_SUCCESS); } -isc_uint32_t +uint32_t isc_time_nanoseconds(const isc_time_t *t) { REQUIRE(t != NULL); ENSURE(t->nanoseconds < NS_PER_S); - return ((isc_uint32_t)t->nanoseconds); + return ((uint32_t)t->nanoseconds); } void |
