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. --- html.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index 89cb375c..3649b5fc 100644 --- a/html.c +++ b/html.c @@ -101,7 +101,7 @@ html_alloc(char *outopts) h = calloc(1, sizeof(struct html)); if (NULL == h) { - fprintf(stderr, "memory exhausted\n"); + perror(NULL); exit(EXIT_FAILURE); } @@ -354,7 +354,7 @@ print_otag(struct html *h, enum htmltag tag, if ( ! (HTML_NOSTACK & htmltags[tag].flags)) { t = malloc(sizeof(struct tag)); if (NULL == t) { - fprintf(stderr, "memory exhausted\n"); + perror(NULL); exit(EXIT_FAILURE); } t->tag = tag; -- cgit