[librsvg: 16/18] Remove superfluous use of g_propagate_error()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 16/18] Remove superfluous use of g_propagate_error()
- Date: Fri, 23 Nov 2018 22:32:50 +0000 (UTC)
commit e9285303cafd8655092fffad68dc1d50f1c2df2f
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Nov 23 15:15:54 2018 -0600
Remove superfluous use of g_propagate_error()
librsvg/rsvg-io.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/librsvg/rsvg-io.c b/librsvg/rsvg-io.c
index a7a69ebf..b18b36b3 100644
--- a/librsvg/rsvg-io.c
+++ b/librsvg/rsvg-io.c
@@ -43,15 +43,13 @@ rsvg_acquire_gvfs_stream (const char *uri,
{
GFile *file;
GFileInputStream *stream;
- GError *err = NULL;
file = g_file_new_for_uri (uri);
- stream = g_file_read (file, cancellable, &err);
+ stream = g_file_read (file, cancellable, error);
g_object_unref (file);
if (stream == NULL) {
- g_propagate_error (error, err);
return NULL;
}
@@ -84,25 +82,19 @@ rsvg_acquire_gvfs_data (const char *uri,
GError **error)
{
GFile *file;
- GError *err;
char *data;
gsize len;
char *content_type;
gboolean res;
file = g_file_new_for_uri (uri);
-
- err = NULL;
data = NULL;
- res = g_file_load_contents (file, cancellable, &data, &len, NULL, &err);
-
+ res = g_file_load_contents (file, cancellable, &data, &len, NULL, error);
g_object_unref (file);
+
if (!res) {
- if (err) {
- g_propagate_error (error, err);
- return NULL;
- }
+ return NULL;
}
if (out_mime_type &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]