diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-07 12:19:39 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-07 12:19:39 +0000 |
commit | b0df99ee07933dac07e6581a629a0711131f500f (patch) | |
tree | 4187a0fc2370c934f27abc6cf344644d6e54f848 /man_term.c | |
parent | ce9be39b8d74df23fb02200661ad968192efe53a (diff) | |
download | mandoc-b0df99ee07933dac07e6581a629a0711131f500f.tar.gz |
Header buffers in -man -Tascii are static.
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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); } |