summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}