[gnome-photos/wip/rishi/collection: 6/40] item-manager: Use g_auto*
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 6/40] item-manager: Use g_auto*
- Date: Wed, 24 Jan 2018 22:40:45 +0000 (UTC)
commit 6bc75e35f7395ab463712c5b9d5e95dd05e36f41
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jan 24 12:20:53 2018 +0100
item-manager: Use g_auto*
src/photos-item-manager.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index b7dc3b2f..46c0db10 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -1061,11 +1061,11 @@ PhotosBaseItem *
photos_item_manager_create_item (PhotosItemManager *self, TrackerSparqlCursor *cursor)
{
GIOExtension *extension;
+ g_auto (GStrv) split_identifier = NULL;
GType type;
PhotosBaseItem *ret_val = NULL;
const gchar *extension_name = "local";
- gchar *identifier = NULL;
- gchar **split_identifier = NULL;
+ g_autofree gchar *identifier = NULL;
g_return_val_if_fail (PHOTOS_IS_ITEM_MANAGER (self), NULL);
g_return_val_if_fail (TRACKER_SPARQL_IS_CURSOR (cursor), NULL);
@@ -1103,8 +1103,6 @@ photos_item_manager_create_item (PhotosItemManager *self, TrackerSparqlCursor *c
NULL));
out:
- g_strfreev (split_identifier);
- g_free (identifier);
return ret_val;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]