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

+2 -9
View File
@@ -690,9 +690,6 @@ static void
adopt_steal_mainctx (OstreeFetcher *self,
GMainContext *mainctx)
{
GHashTableIter hiter;
gpointer key, value;
g_assert (self->mainctx == NULL);
self->mainctx = mainctx; /* Transfer */
@@ -706,12 +703,8 @@ adopt_steal_mainctx (OstreeFetcher *self,
update_timeout_cb (self->multi, timeout_micros / 1000, self);
}
g_hash_table_iter_init (&hiter, self->sockets);
while (g_hash_table_iter_next (&hiter, &key, &value))
{
SockInfo *fdp = key;
setsock (fdp, fdp->sockfd, fdp->action, self);
}
GLNX_HASH_TABLE_FOREACH (self->sockets, SockInfo*, fdp)
setsock (fdp, fdp->sockfd, fdp->action, self);
}
static void