fileio: make use of DEFINE_TRIVIAL_CLEANUP_FUNC where it makes sense

This commit is contained in:
Lennart Poettering 2017-11-08 21:33:19 +01:00
parent 3160497017
commit 57d6f70019

View file

@ -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;