]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/fd-util: drop report from fd_cloexec_many 33074/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 29 May 2024 10:47:41 +0000 (12:47 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 May 2024 10:07:57 +0000 (12:07 +0200)
fd_cloexec_many promised to report if work was done, but that code was
not effective, because it always reported true if any fds were open.
But no callers care about the return value, so let's just drop this.

src/basic/fd-util.c

index f9cac3d99e9cd0ddf9a06cce8beb87eec89bd568..c33cc6f783bac2aa530091709a8911fcbad579c3 100644 (file)
@@ -212,9 +212,6 @@ int fd_cloexec_many(const int fds[], size_t n_fds, bool cloexec) {
                         continue;
 
                 RET_GATHER(r, fd_cloexec(*fd, cloexec));
-
-                if (r >= 0)
-                        r = 1; /* report if we did anything */
         }
 
         return r;