fileio: make use of DEFINE_TRIVIAL_CLEANUP_FUNC where it makes sense
This commit is contained in:
parent
3160497017
commit
57d6f70019
|
@ -1527,9 +1527,7 @@ int mkdtemp_malloc(const char *template, char **ret) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void funlockfilep(FILE **f) {
|
||||
funlockfile(*f);
|
||||
}
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, funlockfile);
|
||||
|
||||
int read_line(FILE *f, size_t limit, char **ret) {
|
||||
_cleanup_free_ char *buffer = NULL;
|
||||
|
|
Loading…
Reference in a new issue