chiark / gitweb /
Extract looping over /proc/cmdline into a shared function
[elogind.git] / src / shared / fdset.h
index 1a26005183df59451fa9c11cd0aa1f4030d5e757..907acd76dd6a50aa9373d33afbea6428e6812fec 100644 (file)
@@ -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)