[tracker/wip/carlosg/anonymous-nodes: 24/46] libtracker-data: Drop unused argument in function
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/anonymous-nodes: 24/46] libtracker-data: Drop unused argument in function
- Date: Sun, 12 Dec 2021 14:15:40 +0000 (UTC)
commit d5f86dd6d20c94ad30c5a293c9480756ebe16a56
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Sep 20 01:20:29 2021 +0200
libtracker-data: Drop unused argument in function
This is not used by any callers, drop it.
src/libtracker-data/tracker-data-manager.c | 4 ++--
src/libtracker-data/tracker-data-update.c | 21 +++++----------------
src/libtracker-data/tracker-data-update.h | 1 -
3 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index ee06c93db..6a74e1fb1 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -843,7 +843,7 @@ tracker_data_ontology_load_statement (TrackerDataManager *manager,
}
subject_id = tracker_data_update_ensure_resource (manager->data_update,
- subject, NULL, error);
+ subject, error);
if (!subject_id) {
g_prefix_error (error, "%s:", object_location);
goto fail;
@@ -894,7 +894,7 @@ tracker_data_ontology_load_statement (TrackerDataManager *manager,
subject_id = tracker_data_update_ensure_resource (manager->data_update,
subject,
- NULL, error);
+ error);
if (!subject_id) {
g_prefix_error (error, "%s:", object_location);
goto fail;
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index c94fdc532..fa0b1c672 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -689,7 +689,6 @@ query_resource_id (TrackerData *data,
gint
tracker_data_update_ensure_resource (TrackerData *data,
const gchar *uri,
- gboolean *create,
GError **error)
{
TrackerDBInterface *iface;
@@ -701,8 +700,6 @@ tracker_data_update_ensure_resource (TrackerData *data,
id = GPOINTER_TO_INT (g_hash_table_lookup (data->update_buffer.resource_cache, uri));
if (id != 0) {
- if (create)
- *create = FALSE;
return id;
}
@@ -726,9 +723,6 @@ tracker_data_update_ensure_resource (TrackerData *data,
id = query_resource_id (data, uri, &inner_error);
if (id != 0) {
- if (create)
- *create = FALSE;
-
g_hash_table_insert (data->update_buffer.resource_cache, g_strdup (uri),
GINT_TO_POINTER (id));
return id;
}
@@ -739,9 +733,6 @@ tracker_data_update_ensure_resource (TrackerData *data,
return 0;
}
- if (create)
- *create = TRUE;
-
id = tracker_db_interface_sqlite_get_last_insert_id (iface);
key = g_strdup (uri);
g_hash_table_insert (data->update_buffer.resource_cache, key, GINT_TO_POINTER (id));
@@ -1731,7 +1722,7 @@ bytes_to_gvalue (GBytes *bytes,
g_value_take_boxed (gvalue, datetime);
break;
case TRACKER_PROPERTY_TYPE_RESOURCE:
- object_id = tracker_data_update_ensure_resource (data, value, NULL, error);
+ object_id = tracker_data_update_ensure_resource (data, value, error);
g_value_init (gvalue, G_TYPE_INT64);
g_value_set_int64 (gvalue, object_id);
break;
@@ -2340,11 +2331,9 @@ resource_buffer_switch (TrackerData *data,
GPtrArray *rdf_types;
/* subject not yet in cache, retrieve or create ID */
- resource_id =
- tracker_data_update_ensure_resource (data,
- subject,
- NULL,
- error);
+ resource_id = tracker_data_update_ensure_resource (data,
+ subject,
+ error);
if (resource_id == 0)
return FALSE;
@@ -3184,7 +3173,7 @@ tracker_data_ensure_graph (TrackerData *data,
TrackerDBStatement *stmt;
gint id;
- id = tracker_data_update_ensure_resource (data, uri, NULL, error);
+ id = tracker_data_update_ensure_resource (data, uri, error);
if (id == 0)
return 0;
diff --git a/src/libtracker-data/tracker-data-update.h b/src/libtracker-data/tracker-data-update.h
index a27c066c7..eb79f34ef 100644
--- a/src/libtracker-data/tracker-data-update.h
+++ b/src/libtracker-data/tracker-data-update.h
@@ -141,7 +141,6 @@ gboolean tracker_data_update_resource (TrackerData *data,
gint tracker_data_update_ensure_resource (TrackerData *data,
const gchar *uri,
- gboolean *create,
GError **error);
gchar * tracker_data_update_ensure_new_bnode (TrackerData *data,
TrackerDBInterface *iface,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]