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

isc_time_formattimestamp() created static const for bad time string

This commit is contained in:
Danny Mayer 2001-09-05 04:18:15 +00:00
parent fdacf913e1
commit e78a28ffb5

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.c,v 1.27 2001/09/01 00:55:24 gson Exp $ */
/* $Id: time.c,v 1.28 2001/09/05 04:18:15 mayer Exp $ */
#include <config.h>
@ -216,6 +216,7 @@ isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len) {
FILETIME localft;
SYSTEMTIME st;
static const char badtime[] = "Bad 00 99:99:99.999";
static const char *months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
@ -229,6 +230,6 @@ isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len) {
months[st.wMonth], st.wDay, st.wHour, st.wMinute,
st.wSecond, st.wMilliseconds);
} else {
snprintf(buf, len, "<bad time>");
snprintf(buf, len, badtime);
}
}