summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-30 18:50:11 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-30 18:50:11 +0000
commit268a942dd654eb4b1874737cd781345c4476aea2 (patch)
treecb43a6380e13338a8e0de35fea543e753f8697a6 /term.c
parentea8cd0ee934ae86efb80393ca7b51e913e55043f (diff)
downloadmandoc-268a942dd654eb4b1874737cd781345c4476aea2.tar.gz
Lint fixes.
Made realloc puke with fprintf.
Diffstat (limited to 'term.c')
-rw-r--r--term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/term.c b/term.c
index 15ab98ef..e7e91694 100644
--- a/term.c
+++ b/term.c
@@ -543,8 +543,10 @@ buffer(struct termp *p, char c)
p->maxcols = 256;
s = p->maxcols * 2;
p->buf = realloc(p->buf, s);
- if (NULL == p->buf)
- err(1, "realloc"); /* FIXME: shouldn't be here! */
+ if (NULL == p->buf) {
+ fprintf(stderr, "memory exhausted\n");
+ exit(EXIT_FAILURE);
+ }
p->maxcols = s;
}
p->buf[(int)(p->col)++] = c;