=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.32 retrieving revision 1.34 diff -u -p -r1.32 -r1.34 --- mandoc/man_term.c 2009/10/03 19:57:53 1.32 +++ mandoc/man_term.c 2009/10/07 12:19:39 1.34 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.32 2009/10/03 19:57:53 kristaps Exp $ */ +/* $Id: man_term.c,v 1.34 2009/10/07 12:19:39 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -160,7 +160,6 @@ man_run(struct termp *p, const struct man *m) static void - fmt_block_vspace(struct termp *p, const struct man_node *n) { term_newln(p); @@ -920,15 +919,12 @@ static void print_foot(struct termp *p, const struct man_meta *meta) { struct tm *tm; - char *buf; + char buf[BUFSIZ]; - if (NULL == (buf = malloc(p->rmargin))) - err(EXIT_FAILURE, "malloc"); - tm = localtime(&meta->date); if (0 == strftime(buf, p->rmargin, "%B %d, %Y", tm)) - err(EXIT_FAILURE, "strftime"); + (void)strlcpy(buf, "(invalid date)", BUFSIZ); term_vspace(p); @@ -949,8 +945,6 @@ print_foot(struct termp *p, const struct man_meta *met term_word(p, buf); term_flushln(p); - - free(buf); }