summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-07 12:19:39 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-07 12:19:39 +0000
commitb0df99ee07933dac07e6581a629a0711131f500f (patch)
tree4187a0fc2370c934f27abc6cf344644d6e54f848 /man_term.c
parentce9be39b8d74df23fb02200661ad968192efe53a (diff)
downloadmandoc-b0df99ee07933dac07e6581a629a0711131f500f.tar.gz
Header buffers in -man -Tascii are static.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/man_term.c b/man_term.c
index 8bf4cabe..e130f4f6 100644
--- a/man_term.c
+++ b/man_term.c
@@ -919,15 +919,12 @@ static void
print_foot(struct termp *p, const struct man_meta *meta)
{
struct tm *tm;
- char *buf;
-
- if (NULL == (buf = malloc(p->rmargin)))
- err(EXIT_FAILURE, "malloc");
+ char buf[BUFSIZ];
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);
@@ -948,8 +945,6 @@ print_foot(struct termp *p, const struct man_meta *meta)
term_word(p, buf);
term_flushln(p);
-
- free(buf);
}