Subject: [PATCH 06/17] avoid shadow vars: basebackup_target.c: ttype

From: Justin Pryzby <[email-masked]>
Date: Tue, 16 Aug 2022 18:51:10 -0500

backpatch to v15

commit e4ba69f3f4a1b997aa493cc02e563a91c0f35b87
Author: Robert Haas <[email-masked]>
Date:   Tue Mar 15 13:22:04 2022 -0400

    Allow extensions to add new backup targets.
---
 src/backend/backup/basebackup_target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/backup/basebackup_target.c b/src/backend/backup/basebackup_target.c
index 83928e32055..8d10fe15530 100644
--- a/src/backend/backup/basebackup_target.c
+++ b/src/backend/backup/basebackup_target.c
@@ -73,7 +73,7 @@ BaseBackupAddTarget(char *name,
 	/* Search the target type list for an existing entry with this name. */
 	foreach(lc, BaseBackupTargetTypeList)
 	{
-		BaseBackupTargetType *ttype = lfirst(lc);
+		ttype = lfirst(lc);
 
 		if (strcmp(ttype->name, name) == 0)
 		{
-- 
2.17.1

--uTRFFR9qmiCqR05s
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0007-avoid-shadow-vars-parse_jsontable.c-jtc.patch"