aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/chars.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 /chars.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 'chars.c')
-rw-r--r--chars.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chars.c b/chars.c
index 34b1e9cd..880a1f6d 100644
--- a/chars.c
+++ b/chars.c
@@ -1,4 +1,4 @@
-/* $Id: chars.c,v 1.10 2009/10/30 18:43:24 kristaps Exp $ */
+/* $Id: chars.c,v 1.11 2009/10/31 06:10:57 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -91,13 +91,13 @@ chars_init(enum chars type)
tab = malloc(sizeof(struct tbl));
if (NULL == tab) {
- fprintf(stderr, "memory exhausted\n");
+ perror(NULL);
exit(EXIT_FAILURE);
}
htab = calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
if (NULL == htab) {
- fprintf(stderr, "memory exhausted\n");
+ perror(NULL);
exit(EXIT_FAILURE);
}