summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Lebon <jonathan@jlebon.com>2019-07-26 11:52:27 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2019-07-29 13:58:29 +0000
commit97c673b64bcb351ade811818683fa5609d8994d7 (patch)
tree636f33d0f8d2a3296d83aae4d2a8fa7b6131b50e
parent9332830e09e285ba1db9357a4e695d1251b00dd7 (diff)
downloadostree-97c673b64bcb351ade811818683fa5609d8994d7.tar.gz
lib/pull: Rename variable for clarity
Let's use `checksum` instead of the more general `contents`. Closes: #1891 Approved by: cgwalters
-rw-r--r--src/libostree/ostree-repo-pull.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 67b28f8c..04551f2c 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -4334,14 +4334,14 @@ ostree_repo_pull_with_options (OstreeRepo *self,
GLNX_HASH_TABLE_FOREACH_KV (requested_refs_to_fetch, const OstreeCollectionRef*, ref,
const char*, override_commitid)
{
- g_autofree char *contents = NULL;
+ g_autofree char *checksum = NULL;
g_autoptr(OstreeCollectionRef) ref_with_collection = NULL;
/* Support specifying "" for an override commitid */
if (override_commitid && *override_commitid)
{
ref_with_collection = ostree_collection_ref_dup (ref);
- contents = g_strdup (override_commitid);
+ checksum = g_strdup (override_commitid);
}
else
{
@@ -4351,18 +4351,18 @@ ostree_repo_pull_with_options (OstreeRepo *self,
guint64 *malloced_size;
g_autofree gchar *collection_id = NULL;
- if (!lookup_commit_checksum_and_collection_from_summary (pull_data, ref, &contents, &commit_size, &collection_id, error))
+ if (!lookup_commit_checksum_and_collection_from_summary (pull_data, ref, &checksum, &commit_size, &collection_id, error))
goto out;
ref_with_collection = ostree_collection_ref_new (collection_id, ref->ref_name);
malloced_size = g_new0 (guint64, 1);
*malloced_size = commit_size;
- g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (contents), malloced_size);
+ g_hash_table_insert (pull_data->expected_commit_sizes, g_strdup (checksum), malloced_size);
}
else
{
- if (!fetch_ref_contents (pull_data, main_collection_id, ref, &contents, cancellable, error))
+ if (!fetch_ref_contents (pull_data, main_collection_id, ref, &checksum, cancellable, error))
goto out;
ref_with_collection = ostree_collection_ref_dup (ref);
@@ -4389,7 +4389,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
g_hash_table_replace (updated_requested_refs_to_fetch,
g_steal_pointer (&ref_with_collection),
- g_steal_pointer (&contents));
+ g_steal_pointer (&checksum));
}
g_hash_table_unref (requested_refs_to_fetch);