projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faab72d
)
execute: use structured initialization
author
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Mar 2019 15:39:17 +0000
(16:39 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Mar 2019 15:53:45 +0000
(16:53 +0100)
src/core/execute.c
patch
|
blob
|
history
diff --git
a/src/core/execute.c
b/src/core/execute.c
index 39d9f07518be500a829ad43997ee81c1cfb40eae..0336083b0e20998b6618f81ae7e1c6b610e9dc92 100644
(file)
--- a/
src/core/execute.c
+++ b/
src/core/execute.c
@@
-4864,14
+4864,20
@@
static void exec_runtime_freep(ExecRuntime **rt) {
(void) exec_runtime_free(*rt, false);
}
-static int exec_runtime_allocate(ExecRuntime **rt) {
-
assert(rt)
;
+static int exec_runtime_allocate(ExecRuntime **r
e
t) {
+
ExecRuntime *n
;
- *rt = new0(ExecRuntime, 1);
- if (!*rt)
+ assert(ret);
+
+ n = new(ExecRuntime, 1);
+ if (!n)
return -ENOMEM;
- (*rt)->netns_storage_socket[0] = (*rt)->netns_storage_socket[1] = -1;
+ *n = (ExecRuntime) {
+ .netns_storage_socket = { -1, -1 },
+ };
+
+ *ret = n;
return 0;
}