projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b059ee
)
core: execute - use hashmap_ensure_put
author
Susant Sahani
<ssahani@vmware.com>
Mon, 18 Jan 2021 18:13:33 +0000
(19:13 +0100)
committer
Susant Sahani
<ssahani@vmware.com>
Mon, 18 Jan 2021 20:53:25 +0000
(21:53 +0100)
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index ee5f082783b484b826f17fe0dd77299dde4b7394..2ac9537e1b78af6c82f02a2dc31367360ae5bc01 100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-6059,15
+6059,11
@@
static int exec_runtime_add(
/* tmp_dir, var_tmp_dir, netns_storage_socket fds are donated on success */
- r = hashmap_ensure_allocated(&m->exec_runtime_by_id, &string_hash_ops);
- if (r < 0)
- return r;
-
r = exec_runtime_allocate(&rt, id);
if (r < 0)
return r;
- r = hashmap_
put(m->exec_runtime_by_id
, rt->id, rt);
+ r = hashmap_
ensure_put(&m->exec_runtime_by_id, &string_hash_ops
, rt->id, rt);
if (r < 0)
return r;