aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/tablesample/tablesample.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-06-30 12:53:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-06-30 12:53:54 -0400
commit131926a52da0fbd77678cbd887914c83b48faa2d (patch)
tree80d5b0a36c7776693f1a969b29367864022f5dcd /src/backend/access/tablesample/tablesample.c
parent302ac7f27197855afa8c89fae36c85c124ae156b (diff)
downloadpostgresql-131926a52da0fbd77678cbd887914c83b48faa2d.tar.gz
postgresql-131926a52da0fbd77678cbd887914c83b48faa2d.zip
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
Diffstat (limited to 'src/backend/access/tablesample/tablesample.c')
-rw-r--r--src/backend/access/tablesample/tablesample.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/access/tablesample/tablesample.c b/src/backend/access/tablesample/tablesample.c
index 44a24340f6b..f21d42c8e38 100644
--- a/src/backend/access/tablesample/tablesample.c
+++ b/src/backend/access/tablesample/tablesample.c
@@ -103,19 +103,13 @@ tablesample_init(SampleScanState *scanstate, TableSampleClause *tablesample)
fcinfo.argnull[1] = false;
}
- /* Rest of the arguments come from user. */
+ /* Rest of the arguments come from user. */
i = 2;
foreach(arg, args)
{
Expr *argexpr = (Expr *) lfirst(arg);
ExprState *argstate = ExecInitExpr(argexpr, (PlanState *) scanstate);
- if (argstate == NULL)
- {
- fcinfo.argnull[i] = true;
- fcinfo.arg[i] = (Datum) 0;;
- }
-
fcinfo.arg[i] = ExecEvalExpr(argstate, econtext,
&fcinfo.argnull[i], NULL);
i++;