]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fd-util: use close_many() where appropriate 29583/head
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Oct 2023 12:03:47 +0000 (14:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Oct 2023 12:03:47 +0000 (14:03 +0200)
src/basic/fd-util.c

index 5fdbf8f26937363a0922112635accbbcef12c3a7..59c243e70d13ee759d2165843037a7976a324a07 100644 (file)
@@ -752,8 +752,7 @@ finish:
                 safe_close_above_stdio(original_error_fd);
 
         /* Close the copies we moved > 2 */
-        for (int i = 0; i < 3; i++)
-                safe_close(copy_fd[i]);
+        close_many(copy_fd, 3);
 
         /* Close our null fd, if it's > 2 */
         safe_close_above_stdio(null_fd);