This fixes maybe-uninitialized warning:
```
../src/basic/fileio.c: In function ‘chase_symlinks_and_fopen_unlocked’:
../src/basic/fileio.c:1026:19: warning: ‘f’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1026 | *ret_file = f;
| ~~~~~~~~~~^~~
```
}
int take_fdopen_unlocked(int *fd, const char *options, FILE **ret) {
- int r;
+ int r;
assert(fd);
_cleanup_close_ int fd = -1;
_cleanup_free_ char *final_path = NULL;
int mode_flags, r;
- FILE *f;
assert(path);
assert(open_flags);
if (fd < 0)
return fd;
- r = fdopen_unlocked(fd, open_flags, &f);
+ r = take_fdopen_unlocked(&fd, open_flags, ret_file);
if (r < 0)
return r;
- TAKE_FD(fd);
- *ret_file = f;
if (ret_path)
*ret_path = TAKE_PTR(final_path);
return 0;