chiark / gitweb /
Stop talking about the "XDG" version of basename()
[elogind.git] / src / libelogind / sd-hwdb / sd-hwdb.c
index 3bbf02896b846bded9fda499fe5c41e5c315ea49..40aa77ee5ca2af1c441cd16a90a532250e7a9350 100644 (file)
@@ -317,7 +317,7 @@ _public_ int sd_hwdb_new(sd_hwdb **ret) {
         if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 ||
             (size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) {
                 log_debug("error recognizing the format of %s", hwdb_bin_path);
-                return -EINVAL;;
+                return -EINVAL;
         }
 
         log_debug("=== trie on-disk ===");
@@ -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;