[cairo-commit] src/cairo-png.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Nov 26 02:36:27 PST 2008
src/cairo-png.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 039437c9cfaeed7a2cc1977623ab8bda9854b58a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Nov 26 10:31:09 2008 +0000
[png] Use FILE* instead of void*.
Adrian Johnson reported that cygwin complained about the use of the void *
within feof() as it was using a macro and attempted a to deference the
void*...
diff --git a/src/cairo-png.c b/src/cairo-png.c
index e8f61b5..5bb658c 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -462,14 +462,16 @@ convert_bytes_to_data (png_structp png, png_row_infop row_info, png_bytep data)
static cairo_status_t
stdio_read_func (void *closure, unsigned char *data, unsigned int size)
{
+ FILE *file = closure;
+
while (size) {
size_t ret;
- ret = fread (data, 1, size, closure);
+ ret = fread (data, 1, size, file);
size -= ret;
data += ret;
- if (size && (feof (closure) || ferror (closure)))
+ if (size && (feof (file) || ferror (file)))
return _cairo_error (CAIRO_STATUS_READ_ERROR);
}
More information about the cairo-commit
mailing list