Fix compiler warning in jsonpath_exec.c

Warning was observed in gcc 4.4.6, gcc 4.4.7 and probably others.

Reported-by: Tom Lane
Discussion: https://postgr.es/m/25151.1552751426%40sss.pgh.pa.us
This commit is contained in:
Alexander Korotkov 2019-03-17 10:10:21 +03:00
parent 0176eb210e
commit 042162d628

View File

@ -1459,15 +1459,11 @@ executePredicate(JsonPathExecContext *cxt, JsonPathItem *pred,
JsonbValue *rval;
bool first = true;
JsonValueListInitIterator(&rseq, &rseqit);
if (rarg)
{
JsonValueListInitIterator(&rseq, &rseqit);
rval = JsonValueListNext(&rseq, &rseqit);
}
else
{
rval = NULL;
}
/* Loop over right arg sequence or do single pass otherwise */
while (rarg ? (rval != NULL) : first)