summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-06-09 08:29:41 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2014-06-09 08:29:41 (GMT)
commitd8af6b79ab624a323319cd3fe1454813fb2ecf7c (patch)
treeb4c610ba2ba53d80fe5c155d1a3c3f004a6120d8
parentc66f77d7fa015bf80209e13366e5a38f94bc7624 (diff)
downloadalphagen-d8af6b79ab624a323319cd3fe1454813fb2ecf7c.tar.gz
alphagen-d8af6b79ab624a323319cd3fe1454813fb2ecf7c.tar.bz2
Don't use typecasted NULL definitions. (Removed in libpng 1.4.0)
Use plain NULL instead.
-rw-r--r--src/alphagen.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/alphagen.c b/src/alphagen.c
index a60368e..d37b36c 100644
--- a/src/alphagen.c
+++ b/src/alphagen.c
@@ -287,8 +287,7 @@ bool image_read_png(char *file_name, struct image *img)
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL) {
fclose(fp);
- png_destroy_read_struct(&png_ptr, png_infopp_NULL,
- png_infopp_NULL);
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
return false;
}
@@ -297,7 +296,7 @@ bool image_read_png(char *file_name, struct image *img)
if (setjmp(png_jmpbuf(png_ptr))) {
/* Free all of the memory associated with the png_ptr and
* info_ptr */
- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
fclose(fp);
/* If we get here, we had a problem reading the file */
return false;
@@ -310,7 +309,7 @@ bool image_read_png(char *file_name, struct image *img)
png_set_sig_bytes(png_ptr, sig_read);
/* Read in the entire image at once */
- png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING, png_voidp_NULL);
+ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING, NULL);
width = png_get_image_width(png_ptr, info_ptr);
height = png_get_image_height(png_ptr, info_ptr);
@@ -331,7 +330,7 @@ bool image_read_png(char *file_name, struct image *img)
}
/* clean up after the read, and free any memory allocated */
- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
/* close the file */
fclose(fp);
@@ -387,7 +386,7 @@ bool image_write_png(char *file_name, struct image *img)
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL) {
fclose(fp);
- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
+ png_destroy_write_struct(&png_ptr, NULL);
return false;
}
/* Set error handling, needed because I gave NULLs to