*: convert amenable fdopen calls to take_fdopen

Mechanical change to eliminate some cruft by using the
new take_fdopen{_unlocked}() wrappers where trivial.
This commit is contained in:
Vito Caputo
2020-03-31 06:48:03 -07:00
parent 3ebbb6cb39
commit 4fa744a35c
12 changed files with 16 additions and 37 deletions
+1 -2
View File
@@ -1280,10 +1280,9 @@ static int unit_file_load(
if (r < 0)
return r;
f = fdopen(fd, "r");
f = take_fdopen(&fd, "r");
if (!f)
return -errno;
fd = -1;
/* c is only needed if we actually load the file (it's referenced from items[] btw, in case you wonder.) */
assert(c);