]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Wed, 5 Sep 2001 17:32:05 +0000 (17:32 +0000)
committerAndreas Gustafsson <source@isc.org>
Wed, 5 Sep 2001 17:32:05 +0000 (17:32 +0000)
isc_time_formattimestamp() created static const for bad time string

lib/isc/win32/time.c

index 166ea4ce5313b988dc72886f8e9f7213e9d00666..1e8107c90b37d392e500f28a989766296f354c02 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: time.c,v 1.24.2.1 2001/09/05 00:38:12 gson Exp $ */
+/* $Id: time.c,v 1.24.2.2 2001/09/05 17:32:05 gson 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);
        }
 }