From c5becba7c522962cf3f0f8b6e02a771b217b26a2 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 16 Jun 2025 09:32:44 -0400 Subject: xspawn: Fix a -Wshadow warning on macOS --- src/xspawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xspawn.c b/src/xspawn.c index cf31cc9..ee62c05 100644 --- a/src/xspawn.c +++ b/src/xspawn.c @@ -246,8 +246,8 @@ int bfs_spawn_addfchdir(struct bfs_spawn *ctx, int fd) { #if __APPLE__ // macOS has a bug that causes EBADF when an fchdir() action refers to a // file opened by the file actions - for_slist (struct bfs_spawn_action, action, ctx) { - if (fd == action->out_fd) { + for_slist (struct bfs_spawn_action, prev, ctx) { + if (fd == prev->out_fd) { bfs_spawn_clear_posix(ctx); break; } -- cgit v1.2.3