2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

3379. [bug] isc_interval_zero and isc_time_epoch should be

"const (type)* const". [RT #31069]
This commit is contained in:
Mark Andrews
2012-09-26 14:58:53 +10:00
parent c91b66c6e6
commit 27809a2ee5
8 changed files with 29 additions and 25 deletions

View File

@@ -41,7 +41,7 @@ struct isc_interval {
unsigned int nanoseconds;
};
extern isc_interval_t *isc_interval_zero;
extern const isc_interval_t * const isc_interval_zero;
ISC_LANG_BEGINDECLS
@@ -85,7 +85,7 @@ struct isc_time {
unsigned int nanoseconds;
};
extern isc_time_t *isc_time_epoch;
extern const isc_time_t * const isc_time_epoch;
void
isc_time_set(isc_time_t *t, unsigned int seconds, unsigned int nanoseconds);

View File

@@ -54,8 +54,8 @@
*** Intervals
***/
static isc_interval_t zero_interval = { 0, 0 };
isc_interval_t *isc_interval_zero = &zero_interval;
static const isc_interval_t zero_interval = { 0, 0 };
const isc_interval_t * const isc_interval_zero = &zero_interval;
#if ISC_FIX_TV_USEC
static inline void
@@ -110,8 +110,8 @@ isc_interval_iszero(const isc_interval_t *i) {
*** Absolute Times
***/
static isc_time_t epoch = { 0, 0 };
isc_time_t *isc_time_epoch = &epoch;
static const isc_time_t epoch = { 0, 0 };
const isc_time_t * const isc_time_epoch = &epoch;
void
isc_time_set(isc_time_t *t, unsigned int seconds, unsigned int nanoseconds) {