fileio: automatically add NULL sentinel to parse_env_file()

Let's modernize things a bit.
This commit is contained in:
Lennart Poettering
2018-11-14 17:01:55 +01:00
parent 608eea8ea0
commit 13df9c398d
25 changed files with 55 additions and 81 deletions
+3 -1
View File
@@ -248,7 +248,9 @@ int container_get_leader(const char *machine, pid_t *pid) {
return -EINVAL;
p = strjoina("/run/systemd/machines/", machine);
r = parse_env_file(NULL, p, "LEADER", &s, "CLASS", &class, NULL);
r = parse_env_file(NULL, p,
"LEADER", &s,
"CLASS", &class);
if (r == -ENOENT)
return -EHOSTDOWN;
if (r < 0)