[gegl] png-load: Only print error on error
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] png-load: Only print error on error
- Date: Sun, 9 Nov 2014 23:55:46 +0000 (UTC)
commit 2d28e773827436b4134bd7fdbe2af521d40d747c
Author: Jon Nordby <jononor gmail com>
Date: Mon Nov 10 00:50:54 2014 +0100
png-load: Only print error on error
On EOF read_all() will return FALSE and possibly less-than-requested bytes
operations/external/png-load.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/png-load.c b/operations/external/png-load.c
index f327d9f..eae9aad 100644
--- a/operations/external/png-load.c
+++ b/operations/external/png-load.c
@@ -71,8 +71,8 @@ read_fn(png_structp png_ptr, png_bytep buffer, png_size_t length)
gsize bytes_read = 0;
g_assert(stream);
- success = g_input_stream_read_all(stream, buffer, length, &bytes_read, NULL, &err);
- if (!success) {
+ g_input_stream_read_all(stream, buffer, length, &bytes_read, NULL, &err);
+ if (err) {
g_printerr("gegl:load-png %s: %s\n", __PRETTY_FUNCTION__, err->message);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]