pnggroup / libpng

LIBPNG: Portable Network Graphics support, official libpng repository
http://libpng.sf.net
Other
1.25k stars 611 forks source link

Use PNG_ABORT instead of abort in png_safe_error #558

Open flsobral opened 4 months ago

flsobral commented 4 months ago

https://github.com/pnggroup/libpng/blob/f1848a3b560ddcad065242268433af475948461e/pngerror.c#L916

Just use the macro instead of the platform dependent function for cross platform support.

jbowler commented 4 months ago

It's the only direct use of 'abort' in the code so it's inconsistent. Curiously it has been there since I wrote the code in 2011; 'abort' is a required function of an ANSI-C compiler and an ANSI-C compiler is now required (it wasn't originally) so PNG_ABORT should go after 1.6. For the 1.6 the change should be harmless, if @ctruta wants to do it.