aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/intarray/_int_bool.c4
-rw-r--r--contrib/ltree/ltxtquery_io.c4
-rw-r--r--src/backend/utils/adt/tsquery.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index 7557c6acb72..4cc447bab2d 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -196,8 +196,8 @@ makepol(WORKSTATE *state)
case OPEN:
if (makepol(state) == ERR)
return ERR;
- if (lenstack && (stack[lenstack - 1] == (int4) '&' ||
- stack[lenstack - 1] == (int4) '!'))
+ while (lenstack && (stack[lenstack - 1] == (int4) '&' ||
+ stack[lenstack - 1] == (int4) '!'))
{
lenstack--;
pushquery(state, OPR, stack[lenstack]);
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index e1240c3d2fe..826f4e1c9dd 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -241,8 +241,8 @@ makepol(QPRS_STATE *state)
case OPEN:
if (makepol(state) == ERR)
return ERR;
- if (lenstack && (stack[lenstack - 1] == (int4) '&' ||
- stack[lenstack - 1] == (int4) '!'))
+ while (lenstack && (stack[lenstack - 1] == (int4) '&' ||
+ stack[lenstack - 1] == (int4) '!'))
{
lenstack--;
pushquery(state, OPR, stack[lenstack], 0, 0, 0);
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c
index db9236a4741..a155c933e26 100644
--- a/src/backend/utils/adt/tsquery.c
+++ b/src/backend/utils/adt/tsquery.c
@@ -371,8 +371,8 @@ makepol(TSQueryParserState state,
case PT_OPEN:
makepol(state, pushval, opaque);
- if (lenstack && (opstack[lenstack - 1] == OP_AND ||
- opstack[lenstack - 1] == OP_NOT))
+ while (lenstack && (opstack[lenstack - 1] == OP_AND ||
+ opstack[lenstack - 1] == OP_NOT))
{
lenstack--;
pushOperator(state, opstack[lenstack]);