mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 03:24:26 +00:00
Cleaning up returns across api's. pnunn.
This commit is contained in:
parent
d3dcc81302
commit
23c3ae5f4c
@ -25,8 +25,6 @@
|
||||
#include "nsPNGDecoder.h"
|
||||
#include "nsIImgDCallbk.h"
|
||||
|
||||
#define OK 1
|
||||
#define ERROR -1
|
||||
|
||||
extern void png_set_expand(png_structp);
|
||||
extern void png_destroy_read_struct(png_structpp, png_infopp, png_infopp);
|
||||
@ -46,7 +44,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
|
||||
/* Free the png_ptr and info_ptr memory on error */
|
||||
png_destroy_read_struct(png_ptr, info_ptr, (png_infopp)NULL);
|
||||
|
||||
return ERROR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* This one's new also. Simply give it chunks of data as
|
||||
@ -60,7 +58,7 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
|
||||
* callback, if you aren't already displaying them there.
|
||||
*/
|
||||
png_process_data(*png_ptr, *info_ptr, buffer, length);
|
||||
return OK;
|
||||
return 1; //ok
|
||||
}
|
||||
|
||||
void info_callback(png_structp png_ptr, png_infop info)
|
||||
|
Loading…
x
Reference in New Issue
Block a user