[librsvg] Simplify code by using g_clear_error
- From: Hiroyuki Ikezoe <hiikezoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Simplify code by using g_clear_error
- Date: Sun, 6 Jun 2010 11:36:47 +0000 (UTC)
commit d3efef1408c4c5e1b636296c42f295974c4ec5ed
Author: Christian Persch <chpe gnome org>
Date: Sun Jun 6 20:36:05 2010 +0900
Simplify code by using g_clear_error
No need to provide our own implementation of this function.
Bug #620649.
rsvg-image.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/rsvg-image.c b/rsvg-image.c
index d260767..453e58c 100644
--- a/rsvg-image.c
+++ b/rsvg-image.c
@@ -119,17 +119,6 @@ rsvg_acquire_file_resource (const char *filename, const char *base_uri, GError *
#ifdef HAVE_GIO
-static void
-rsvg_free_error (GError ** err)
-{
- if (err) {
- if (*err) {
- g_error_free (*err);
- *err = NULL;
- }
- }
-}
-
static GByteArray *
rsvg_acquire_vfs_resource (const char *filename, const char *base_uri, GError ** error)
{
@@ -148,7 +137,7 @@ rsvg_acquire_vfs_resource (const char *filename, const char *base_uri, GError **
if (base_uri != NULL) {
GFile *base;
- rsvg_free_error (error);
+ g_clear_error (error);
g_object_unref (file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]