summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@vmware.com>2021-01-18 11:23:38 +0100
committerSusant Sahani <ssahani@vmware.com>2021-01-18 21:12:32 +0100
commit0b83974b9105bef58de6272adc8c8b673687192c (patch)
treeef1f1d363e0621db7dea8be86ffd747f84ef0d1f /src
parentb5b9b0e7ba73a4665e3275ed3f309ede68d1c5b4 (diff)
downloadsystemd-0b83974b9105bef58de6272adc8c8b673687192c.tar.gz
install: use ordered_hashmap_ensure_put
Diffstat (limited to 'src')
-rw-r--r--src/shared/install.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 302497a965..e70fa45022 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -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;