mirror of
https://github.com/postgres/postgres.git
synced 2025-06-04 00:02:37 -04: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:
parent
302ac7f271
commit
131926a52d
@ -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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user