From fecec57074220c2494d1098ec3e1fa90362a1e44 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 31 Oct 2009 06:10:57 +0000 Subject: Using perror() instead of fprintf for failure from library functions. --- chars.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chars.c') diff --git a/chars.c b/chars.c index fc43b26b..23b98006 100644 --- a/chars.c +++ b/chars.c @@ -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); } -- cgit