projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be8e4b1
)
conf-parser: use hashmap_ensure_put() at one more place
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 17 Sep 2024 18:13:47 +0000
(
03:13
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 17 Sep 2024 18:13:47 +0000
(
03:13
+0900)
src/shared/conf-parser.c
patch
|
blob
|
history
diff --git
a/src/shared/conf-parser.c
b/src/shared/conf-parser.c
index c9e5b49cd477c7fbcb2dd29939023ae1f0cfff1e..f862d0380b84a15bcf0c21801b44478309430a7d 100644
(file)
--- a/
src/shared/conf-parser.c
+++ b/
src/shared/conf-parser.c
@@
-465,10
+465,6
@@
int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
assert(path);
assert(st);
- r = hashmap_ensure_allocated(stats_by_path, &path_hash_ops_free_free);
- if (r < 0)
- return r;
-
st_copy = newdup(struct stat, st, 1);
if (!st_copy)
return -ENOMEM;
@@
-477,7
+473,7
@@
int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
if (!path_copy)
return -ENOMEM;
- r = hashmap_
put(*stats_by_path
, path_copy, st_copy);
+ r = hashmap_
ensure_put(stats_by_path, &path_hash_ops_free_free
, path_copy, st_copy);
if (r < 0)
return r;