chiark / gitweb /
sd-bus: use proper ITERATOR_FIRST abstraction
authorMichal Schmidt <mschmidt@redhat.com>
Mon, 4 Aug 2014 20:54:10 +0000 (22:54 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Mon, 15 Sep 2014 14:08:50 +0000 (16:08 +0200)
Do not assume hashmap iterators are pointers.
They may be structs in an alternative hashmap implementation.

src/libsystemd/sd-bus/bus-track.c

index 0a3322a..4b6a8bf 100644 (file)
@@ -245,7 +245,7 @@ _public_ const char* sd_bus_track_first(sd_bus_track *track) {
                 return NULL;
 
         track->modified = false;
-        track->iterator = NULL;
+        track->iterator = ITERATOR_FIRST;
 
         hashmap_iterate(track->names, &track->iterator, (const void**) &n);
         return n;