2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-03 08:05:21 +00:00

dns_time*_fromtext should take "const char *"s, not "char *"s.

This commit is contained in:
Brian Wellington
2001-09-21 00:11:30 +00:00
parent 87647e12e9
commit 8f674b13e8
2 changed files with 6 additions and 6 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: time.h,v 1.9 2001/01/09 21:53:32 bwelling Exp $ */ /* $Id: time.h,v 1.10 2001/09/21 00:11:30 bwelling Exp $ */
#ifndef DNS_TIME_H #ifndef DNS_TIME_H
#define DNS_TIME_H 1 #define DNS_TIME_H 1
@@ -34,7 +34,7 @@ ISC_LANG_BEGINDECLS
***/ ***/
isc_result_t isc_result_t
dns_time64_fromtext(char *source, isc_int64_t *target); dns_time64_fromtext(const char *source, isc_int64_t *target);
/* /*
* Convert a date and time in YYYYMMDDHHMMSS text format at 'source' * Convert a date and time in YYYYMMDDHHMMSS text format at 'source'
* into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT. * into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT.
@@ -42,7 +42,7 @@ dns_time64_fromtext(char *source, isc_int64_t *target);
*/ */
isc_result_t isc_result_t
dns_time32_fromtext(char *source, isc_uint32_t *target); dns_time32_fromtext(const char *source, isc_uint32_t *target);
/* /*
* Like dns_time64_fromtext, but returns the second count modulo 2^32 * Like dns_time64_fromtext, but returns the second count modulo 2^32
* as per RFC2535. * as per RFC2535.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: time.c,v 1.18 2001/05/15 22:05:35 gson Exp $ */ /* $Id: time.c,v 1.19 2001/09/21 00:11:29 bwelling Exp $ */
#include <config.h> #include <config.h>
@@ -115,7 +115,7 @@ dns_time32_totext(isc_uint32_t value, isc_buffer_t *target) {
} }
isc_result_t isc_result_t
dns_time64_fromtext(char *source, isc_int64_t *target) { dns_time64_fromtext(const char *source, isc_int64_t *target) {
int year, month, day, hour, minute, second; int year, month, day, hour, minute, second;
isc_int64_t value; isc_int64_t value;
int secs; int secs;
@@ -159,7 +159,7 @@ dns_time64_fromtext(char *source, isc_int64_t *target) {
} }
isc_result_t isc_result_t
dns_time32_fromtext(char *source, isc_uint32_t *target) { dns_time32_fromtext(const char *source, isc_uint32_t *target) {
isc_int64_t value64; isc_int64_t value64;
isc_int32_t value32; isc_int32_t value32;
isc_result_t result; isc_result_t result;