mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
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
This commit is contained in:
@ -110,12 +110,6 @@ tablesample_init(SampleScanState *scanstate, TableSampleClause *tablesample)
|
|||||||
Expr *argexpr = (Expr *) lfirst(arg);
|
Expr *argexpr = (Expr *) lfirst(arg);
|
||||||
ExprState *argstate = ExecInitExpr(argexpr, (PlanState *) scanstate);
|
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.arg[i] = ExecEvalExpr(argstate, econtext,
|
||||||
&fcinfo.argnull[i], NULL);
|
&fcinfo.argnull[i], NULL);
|
||||||
i++;
|
i++;
|
||||||
|
Reference in New Issue
Block a user