codebase: start using GLNX_HASH_TABLE_FOREACH macros

Use the new macros introduced recently in libglnx to make iterating over
hash tables cleaner. This is just a start, it does not migrate the whole
tree.

Update submodule: libglnx

Closes: #971
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon authored and Atomic Bot committed 2017-06-28 16:37:15 +00:00
1 parent ba918e49c5
commit 373dc4b66c
9 files changed
+59 -163

No files matched your search

+5 -8
View File
@@ -773,14 +773,11 @@ aic_import_deferred_hardlinks (OstreeRepoArchiveImportContext *ctx,
GCancellable *cancellable,
GError **error)
{
GHashTableIter iter;
gpointer key, value;
g_hash_table_iter_init (&iter, ctx->deferred_hardlinks);
while (g_hash_table_iter_next (&iter, &key, &value))
if (!aic_import_deferred_hardlinks_for (ctx, key, value, error))
return FALSE;
GLNX_HASH_TABLE_FOREACH_KV (ctx->deferred_hardlinks, const char*, target, GSList*, links)
{
if (!aic_import_deferred_hardlinks_for (ctx, target, links, error))
return FALSE;
}
return TRUE;
}