Skip to content

Commit

Permalink
Formatted rwpng error
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Apr 9, 2012
1 parent fd433f9 commit abe3b5c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions rwpng.c
Expand Up @@ -326,16 +326,11 @@ static void rwpng_error_handler(png_structp png_ptr, png_const_charp msg)
* regardless of whether _BSD_SOURCE or anything else has (or has not)
* been defined. */

fprintf(stderr, "rwpng libpng error: %s\n", msg);
fprintf(stderr, " error: %s\n", msg);
fflush(stderr);

mainprog_ptr = png_get_error_ptr(png_ptr);
if (mainprog_ptr == NULL) { /* we are completely hosed now */
fprintf(stderr,
"rwpng severe error: jmpbuf not recoverable; terminating.\n");
fflush(stderr);
exit(99);
}
if (mainprog_ptr == NULL) abort();

longjmp(mainprog_ptr->jmpbuf, 1);
}

0 comments on commit abe3b5c

Please sign in to comment.