Skip to content

Commit 665785d

Browse files
committed
Fix unnecessary casts of copyObject() result
The result is already of the correct type, so these casts don't do anything. Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Reviewed-by: Tender Wang <tndrwang@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/637eeea8-5663-460b-a114-39572c0f6c6e%40eisentraut.org
1 parent eafda78 commit 665785d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/backend/commands/trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ CreateTriggerFiringOn(CreateTrigStmt *stmt, const char *queryString,
11691169
* Initialize our fabricated parse node by copying the original
11701170
* one, then resetting fields that we pass separately.
11711171
*/
1172-
childStmt = (CreateTrigStmt *) copyObject(stmt);
1172+
childStmt = copyObject(stmt);
11731173
childStmt->funcname = NIL;
11741174
childStmt->whenClause = NULL;
11751175

src/backend/nodes/nodeFuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,7 +2996,7 @@ expression_tree_mutator_impl(Node *node,
29962996
case T_SortGroupClause:
29972997
case T_CTESearchClause:
29982998
case T_MergeSupportFunc:
2999-
return (Node *) copyObject(node);
2999+
return copyObject(node);
30003000
case T_WithCheckOption:
30013001
{
30023002
WithCheckOption *wco = (WithCheckOption *) node;
@@ -3604,7 +3604,7 @@ expression_tree_mutator_impl(Node *node,
36043604
break;
36053605
case T_PartitionPruneStepCombine:
36063606
/* no expression sub-nodes */
3607-
return (Node *) copyObject(node);
3607+
return copyObject(node);
36083608
case T_JoinExpr:
36093609
{
36103610
JoinExpr *join = (JoinExpr *) node;

src/backend/rewrite/rewriteManip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ ReplaceVarsFromTargetList_callback(Var *var,
17151715
break;
17161716

17171717
case REPLACEVARS_CHANGE_VARNO:
1718-
var = (Var *) copyObject(var);
1718+
var = copyObject(var);
17191719
var->varno = rcon->nomatch_varno;
17201720
/* we leave the syntactic referent alone */
17211721
return (Node *) var;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy