[gnome-online-miners] gdata: Consolidate the return sites
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-miners] gdata: Consolidate the return sites
- Date: Fri, 2 Sep 2016 08:20:52 +0000 (UTC)
commit ceff1cd974b2a7207dc1610007492dfa92d9fbf4
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Aug 31 15:02:01 2016 +0200
gdata: Consolidate the return sites
This will make it easier to add paged queries.
https://bugzilla.gnome.org/show_bug.cgi?id=770656
src/gom-gdata-miner.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gom-gdata-miner.c b/src/gom-gdata-miner.c
index 5e4dd5d..29699f9 100644
--- a/src/gom-gdata-miner.c
+++ b/src/gom-gdata-miner.c
@@ -809,8 +809,8 @@ query_gdata_documents (GomAccountMinerJob *job,
GDataDocumentsService *service,
GError **error)
{
- GDataDocumentsQuery *query;
- GDataDocumentsFeed *feed;
+ GDataDocumentsQuery *query = NULL;
+ GDataDocumentsFeed *feed = NULL;
GList *entries, *l;
query = gdata_documents_query_new (NULL);
@@ -819,10 +819,8 @@ query_gdata_documents (GomAccountMinerJob *job,
(service, query,
job->cancellable, NULL, NULL, error);
- g_object_unref (query);
-
if (feed == NULL)
- return;
+ goto out;
entries = gdata_feed_get_entries (GDATA_FEED (feed));
for (l = entries; l != NULL; l = l->next)
@@ -836,7 +834,9 @@ query_gdata_documents (GomAccountMinerJob *job,
}
}
- g_object_unref (feed);
+ out:
+ g_clear_object (&feed);
+ g_clear_object (&query);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]