]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/fdset.c
tree-wide: define iterator inside of the macro
[thirdparty/systemd.git] / src / shared / fdset.c
index 89d118a3aa9c4532550407a6f7e1a9a214dbc6b5..dfe8242fc4cda35a549cb1ebc8e32d4c0d9bd5c5 100644 (file)
@@ -161,13 +161,12 @@ finish:
 }
 
 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;
@@ -209,7 +208,6 @@ fail:
 
 int fdset_close_others(FDSet *fds) {
         void *e;
-        Iterator i;
         int *a = NULL;
         size_t j = 0, m;
 
@@ -217,7 +215,7 @@ int fdset_close_others(FDSet *fds) {
 
         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);
         }