2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

REQUIRE(len > 0)

This commit is contained in:
Andreas Gustafsson
2001-08-31 21:58:49 +00:00
parent c8563aaf86
commit 6184f9fc1e

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: time.c,v 1.37 2001/08/31 21:51:25 gson Exp $ */
/* $Id: time.c,v 1.38 2001/08/31 21:58:49 gson Exp $ */
#include <config.h>
@@ -395,6 +395,8 @@ isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len) {
time_t now;
unsigned int flen;
REQUIRE(len > 0);
now = (time_t) t->seconds;
strftime(buf, len, "%b %d %X", localtime(&now));
flen = strlen(buf);