summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-hwdb/sd-hwdb.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-06-16 14:44:43 +0200
committerMichal Schmidt <mschmidt@redhat.com>2015-06-16 14:44:43 +0200
commit9ef41ffeec0a677f0c8006b17e5ff1c8434418a3 (patch)
treeb0f66b97ddf0e13c4cd1240fc0fd7ef6ad618a82 /src/libsystemd/sd-hwdb/sd-hwdb.c
parentaab723074c368f65aaf2748d0c530ba9a1e6ad3e (diff)
parent8927b1dad2d4a7330174cb924090b4635a2547fb (diff)
Merge pull request #197 from dvdhrm/hashmap
hashmap: fix iterators to not skip entries
Diffstat (limited to 'src/libsystemd/sd-hwdb/sd-hwdb.c')
-rw-r--r--src/libsystemd/sd-hwdb/sd-hwdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
index 2a0e00f7d2..40aa77ee5c 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
@@ -449,7 +449,8 @@ _public_ int sd_hwdb_seek(sd_hwdb *hwdb, const char *modalias) {
}
_public_ int sd_hwdb_enumerate(sd_hwdb *hwdb, const char **key, const char **value) {
- const void *k, *v;
+ const void *k;
+ void *v;
assert_return(hwdb, -EINVAL);
assert_return(key, -EINVAL);
@@ -458,7 +459,7 @@ _public_ int sd_hwdb_enumerate(sd_hwdb *hwdb, const char **key, const char **val
if (hwdb->properties_modified)
return -EAGAIN;
- v = ordered_hashmap_iterate(hwdb->properties, &hwdb->properties_iterator, &k);
+ ordered_hashmap_iterate(hwdb->properties, &hwdb->properties_iterator, &v, &k);
if (!k)
return 0;