Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+1-7
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)