From: Masatake YAMATO Date: Tue, 4 Jul 2023 14:55:22 +0000 (+0900) Subject: test: (mkfds::make-regular-file) make 'fd' local variable reusable X-Git-Tag: v2.40-rc1~345^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4597add151ffb4c5d300fa3a8595021de13d5641;p=thirdparty%2Futil-linux.git test: (mkfds::make-regular-file) make 'fd' local variable reusable Signed-off-by: Masatake YAMATO --- diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index 8da4d4753d..3d7c9a88a2 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -418,6 +418,7 @@ static void *make_w_regular_file(const struct factory *factory, struct fdesc fde err(EXIT_FAILURE, "failed to dup %d -> %d", fd, fdescs[0].fd); } close(fd); + fd = fdescs[0].fd; } if (bDelete) {