Systemd/src/libsystemd/sd-hwdb
David Herrmann 8927b1dad2 hashmap: fix iterators to not skip entries
Currently, the HASHMAP iterators stop at the first NULL entry in a
hashmap. This is non-obvious and breaks users like sd-device, which
legitimately store NULL values in a hashmap.

Fix all the iterators by taking a pointer to the value storage, instead of
returning it. The iterators now return a boolean that tells whether the
end of the list was reached.

Current users of HASHMAP_FOREACH() are *NOT* changed to explicitly check
for NULL. If it turns out, there were users that inserted NULL into
hashmaps, but didn't properly check for it during iteration, then we
really want to find those and fix them.
2015-06-14 16:56:02 +02:00
..
hwdb-internal.h libsystemd: add sd-hwdb library 2014-12-11 13:54:35 +01:00
hwdb-util.h libsystemd: add sd-hwdb library 2014-12-11 13:54:35 +01:00
Makefile libsystemd: add sd-hwdb library 2014-12-11 13:54:35 +01:00
sd-hwdb.c hashmap: fix iterators to not skip entries 2015-06-14 16:56:02 +02:00