X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Ffdset.h;h=907acd76dd6a50aa9373d33afbea6428e6812fec;hp=1a26005183df59451fa9c11cd0aa1f4030d5e757;hb=f41925b4e442a34c93ad120ef1426c974a047ed1;hpb=51d122af23533b0b8318911c4fc8b128ad8eafb7 diff --git a/src/shared/fdset.h b/src/shared/fdset.h index 1a2600518..907acd76d 100644 --- a/src/shared/fdset.h +++ b/src/shared/fdset.h @@ -49,8 +49,5 @@ int fdset_iterate(FDSet *s, Iterator *i); #define FDSET_FOREACH(fd, fds, i) \ for ((i) = ITERATOR_FIRST, (fd) = fdset_iterate((fds), &(i)); (fd) >= 0; (fd) = fdset_iterate((fds), &(i))) -static inline void fdset_freep(FDSet **fds) { - if (*fds) - fdset_free(*fds); -} +DEFINE_TRIVIAL_CLEANUP_FUNC(FDSet*, fdset_free); #define _cleanup_fdset_free_ _cleanup_(fdset_freep)