summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-31 06:10:57 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-31 06:10:57 +0000
commitfecec57074220c2494d1098ec3e1fa90362a1e44 (patch)
tree496a201f25ed00e58a64f0ead626620bb1c08a5e /term.c
parent9b34de59b184407dc87af383dc2b149c837e3b8b (diff)
downloadmandoc-fecec57074220c2494d1098ec3e1fa90362a1e44.tar.gz
Using perror() instead of fprintf for failure from library functions.
Diffstat (limited to 'term.c')
-rw-r--r--term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/term.c b/term.c
index c14be224..5bd26040 100644
--- a/term.c
+++ b/term.c
@@ -78,7 +78,7 @@ term_alloc(enum termenc enc)
p = calloc(1, sizeof(struct termp));
if (NULL == p) {
- fprintf(stderr, "memory exhausted\n");
+ perror(NULL);
exit(EXIT_FAILURE);
}
p->maxrmargin = 78;
@@ -545,7 +545,7 @@ buffer(struct termp *p, char c)
s = p->maxcols * 2;
p->buf = realloc(p->buf, s);
if (NULL == p->buf) {
- fprintf(stderr, "memory exhausted\n");
+ perror(NULL);
exit(EXIT_FAILURE);
}
p->maxcols = s;