1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

install: use ordered_hashmap_ensure_put

This commit is contained in:
Susant Sahani 2021-01-18 11:23:38 +01:00
parent b5b9b0e7ba
commit 0b83974b91

View File

@ -1041,10 +1041,6 @@ static int install_info_add(
return 0;
}
r = ordered_hashmap_ensure_allocated(&c->will_process, &string_hash_ops);
if (r < 0)
return r;
i = new(UnitFileInstallInfo, 1);
if (!i)
return -ENOMEM;
@ -1068,7 +1064,7 @@ static int install_info_add(
}
}
r = ordered_hashmap_put(c->will_process, i->name, i);
r = ordered_hashmap_ensure_put(&c->will_process, &string_hash_ops, i->name, i);
if (r < 0)
goto fail;