summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--man_term.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/man_term.c b/man_term.c
index 661c7e4c..ab720594 100644
--- a/man_term.c
+++ b/man_term.c
@@ -1,4 +1,4 @@
-/* $Id: man_term.c,v 1.33 2009/10/04 15:24:54 kristaps Exp $ */
+/* $Id: man_term.c,v 1.34 2009/10/07 12:19:39 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);
}