chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hashmap: fix iterators to not skip entries
[elogind.git]
/
src
/
libelogind
/
sd-hwdb
/
sd-hwdb.c
diff --git
a/src/libelogind/sd-hwdb/sd-hwdb.c
b/src/libelogind/sd-hwdb/sd-hwdb.c
index 2a0e00f7d234a5b5b10f37c2735964df5dd56124..40aa77ee5ca2af1c441cd16a90a532250e7a9350 100644
(file)
--- a/
src/libelogind/sd-hwdb/sd-hwdb.c
+++ b/
src/libelogind/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) {
}
_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);
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;
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;
if (!k)
return 0;