index 4fc441f11e7f14472e81587a8302fdb78ac4ef5c..c07225749e5620841f6345069d413cce641c320a 100644 (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)