sd-device: fix device_copy_properties()

This fixes a bug introduced by a3ce813697.

Fixes #11652.
This commit is contained in:
Yu Watanabe 2019-02-06 08:36:48 +01:00
parent 6d6308f677
commit 5ce41697bd

View file

@ -712,13 +712,13 @@ int device_copy_properties(sd_device *device_dst, sd_device *device_src) {
if (r < 0)
return r;
ORDERED_HASHMAP_FOREACH_KEY(property, value, device_src->properties_db, i) {
ORDERED_HASHMAP_FOREACH_KEY(value, property, device_src->properties_db, i) {
r = device_add_property_aux(device_dst, property, value, true);
if (r < 0)
return r;
}
ORDERED_HASHMAP_FOREACH_KEY(property, value, device_src->properties, i) {
ORDERED_HASHMAP_FOREACH_KEY(value, property, device_src->properties, i) {
r = device_add_property_aux(device_dst, property, value, false);
if (r < 0)
return r;