[devel] Eliminated PNG_NO_CALLOC and PNG_CALLOC_SUPPORTED

and always use png_calloc().  The macros were only there for testing,
since libpng-1.4.0beta48 and no problems have been reported.
This commit is contained in:
Glenn Randers-Pehrson
2009-09-01 10:48:04 -05:00
parent b380515c84
commit 5618e46179
9 changed files with 17 additions and 66 deletions

View File

@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
* Last changed in libpng 1.4.0 [August 31, 2009]
* Last changed in libpng 1.4.0 [September 1, 2009]
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -1753,14 +1753,8 @@ png_write_start_row(png_structp png_ptr)
if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH))
{
/* Set up previous row buffer */
#ifdef PNG_CALLOC_SUPPORTED
png_ptr->prev_row = (png_bytep)png_calloc(png_ptr,
(png_alloc_size_t)buf_size);
#else
png_ptr->prev_row = (png_bytep)png_malloc(png_ptr,
(png_uint_32)buf_size);
png_memset(png_ptr->prev_row, 0, buf_size);
#endif
if (png_ptr->do_filter & PNG_FILTER_UP)
{