cgroup-util: initialize return param on all success returns

As per coding style.
This commit is contained in:
Lennart Poettering
2023-09-19 22:43:06 +02:00
parent aef43552fc
commit 8ab40789d9
+4 -1
View File
@@ -73,8 +73,10 @@ int cg_read_pid(FILE *f, pid_t *ret) {
errno = 0;
if (fscanf(f, "%lu", &ul) != 1) {
if (feof(f))
if (feof(f)) {
*ret = 0;
return 0;
}
return errno_or_else(EIO);
}
@@ -219,6 +221,7 @@ int cg_read_subgroup(DIR *d, char **ret) {
return 1;
}
*ret = NULL;
return 0;
}