summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-03-10 18:45:52 +0100
committerLennart Poettering <lennart@poettering.net>2022-03-18 23:26:59 +0100
commit40f35786b0030f1f7c4b88828776ada1dd74d03e (patch)
tree769c0c830df60b20105933cd0e7fbbe093203095 /src/machine
parent592d5765520e6110b66f0bc772f59122eb1bff5e (diff)
downloadsystemd-40f35786b0030f1f7c4b88828776ada1dd74d03e.tar.gz
various: make parse_env_file error handling the same in various places
No big reason to do this, except that I was looking at all call sites and it's nicer if the same style is used accross the codebase.
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c
index 80f73da94a..b202220b87 100644
--- a/src/machine/machine.c
+++ b/src/machine/machine.c
@@ -265,12 +265,10 @@ int machine_load(Machine *m) {
"REALTIME", &realtime,
"MONOTONIC", &monotonic,
"NETIF", &netif);
- if (r < 0) {
- if (r == -ENOENT)
- return 0;
-
+ if (r == -ENOENT)
+ return 0;
+ if (r < 0)
return log_error_errno(r, "Failed to read %s: %m", m->state_file);
- }
if (id)
sd_id128_from_string(id, &m->id);