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

+1 -6
View File
@@ -114,9 +114,6 @@ ostree_mutable_tree_set_contents_checksum (OstreeMutableTree *self,
const char *
ostree_mutable_tree_get_contents_checksum (OstreeMutableTree *self)
{
GHashTableIter iter;
gpointer key, value;
if (!self->contents_checksum)
return NULL;
@@ -127,10 +124,8 @@ ostree_mutable_tree_get_contents_checksum (OstreeMutableTree *self)
*
* However, we only call this function once right now.
*/
g_hash_table_iter_init (&iter, self->subdirs);
while (g_hash_table_iter_next (&iter, &key, &value))
GLNX_HASH_TABLE_FOREACH_V (self->subdirs, OstreeMutableTree*, subdir)
{
OstreeMutableTree *subdir = value;
if (!ostree_mutable_tree_get_contents_checksum (subdir))
{
g_free (self->contents_checksum);