Skip to content

Commit 131926a

Browse files
committed
Remove useless check for NULL subexpression.
Coverity rightly gripes that it's silly to have a test here when the adjacent ExecEvalExpr() would choke on a NULL expression pointer. Petr Jelinek
1 parent 302ac7f commit 131926a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/backend/access/tablesample/tablesample.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,13 @@ tablesample_init(SampleScanState *scanstate, TableSampleClause *tablesample)
103103
fcinfo.argnull[1] = false;
104104
}
105105

106-
/* Rest of the arguments come from user. */
106+
/* Rest of the arguments come from user. */
107107
i = 2;
108108
foreach(arg, args)
109109
{
110110
Expr *argexpr = (Expr *) lfirst(arg);
111111
ExprState *argstate = ExecInitExpr(argexpr, (PlanState *) scanstate);
112112

113-
if (argstate == NULL)
114-
{
115-
fcinfo.argnull[i] = true;
116-
fcinfo.arg[i] = (Datum) 0;;
117-
}
118-
119113
fcinfo.arg[i] = ExecEvalExpr(argstate, econtext,
120114
&fcinfo.argnull[i], NULL);
121115
i++;

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