aboutsummaryrefslogtreecommitdiffstatshomepage
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
commita1af4f3969c284fb243f1c0534b332232d54dd98 (patch)
treea6470eccaa1d9774d21bfaf1de23bed99b2d5a75 /term.c
parentb9ac7e789aa2c1bf358e1d967a0b87ef2322744b (diff)
downloadmandoc-a1af4f3969c284fb243f1c0534b332232d54dd98.tar.gz
mandoc-a1af4f3969c284fb243f1c0534b332232d54dd98.tar.zst
mandoc-a1af4f3969c284fb243f1c0534b332232d54dd98.zip
Using perror() instead of fprintf for failure from library functions.
Diffstat (limited to 'term.c')
-rw-r--r--term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/term.c b/term.c
index b9ee9e4c..fd30d990 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.119 2009/10/30 18:53:09 kristaps Exp $ */
+/* $Id: term.c,v 1.120 2009/10/31 06:10:58 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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;