diff options
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: strings.c,v 1.4 2008/12/29 18:08:44 kristaps Exp $ */ +/* $Id: strings.c,v 1.5 2009/01/06 15:49:44 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -133,6 +133,8 @@ mdoc_atotime(const char *p) { struct tm tm; + (void)memset(&tm, 0, sizeof(struct tm)); + if (strptime(p, "%b %d %Y", &tm)) return(mktime(&tm)); if (strptime(p, "%b %d, %Y", &tm)) |