void *p;
while ((p = set_steal_first(MAKE_SET(s)))) {
+ int fd = PTR_TO_FD(p);
+
/* Valgrind's fd might have ended up in this set here, due to fdset_new_fill(). We'll ignore
* all failures here, so that the EBADFD that valgrind will return us on close() doesn't
* influence us */
* which has no effect at all, since they are only duplicates. So don't be surprised about
* these log messages. */
- log_debug("Closing set fd %i", PTR_TO_FD(p));
- (void) close_nointr(PTR_TO_FD(p));
+ if (DEBUG_LOGGING) {
+ _cleanup_free_ char *path = NULL;
+
+ (void) fd_get_path(fd, &path);
+ log_debug("Closing set fd %i (%s)", fd, strna(path));
+ }
+
+ (void) close_nointr(fd);
}
}