-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
int fdset_new_fill(FDSet **_s) {
_cleanup_closedir_ DIR *d = NULL;
- struct dirent *de;
int r = 0;
FDSet *s;
}
int fdset_cloexec(FDSet *fds, bool b) {
- Iterator i;
void *p;
int r;
assert(fds);
- SET_FOREACH(p, MAKE_SET(fds), i) {
+ SET_FOREACH(p, MAKE_SET(fds)) {
r = fd_cloexec(PTR_TO_FD(p), b);
if (r < 0)
return r;
int fdset_close_others(FDSet *fds) {
void *e;
- Iterator i;
int *a = NULL;
size_t j = 0, m;
if (m > 0) {
a = newa(int, m);
- SET_FOREACH(e, MAKE_SET(fds), i)
+ SET_FOREACH(e, MAKE_SET(fds))
a[j++] = PTR_TO_FD(e);
}