aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_gin.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2015-10-11 23:53:35 -0400
committerNoah Misch <noah@leadboat.com>2015-10-12 10:10:51 -0400
commitf75c4fc1dc93d60246df324bf595912d557bcba6 (patch)
tree4d06642c358c1e1956db01d13aa6cd6e58bbea4a /src/backend/utils/adt/jsonb_gin.c
parent7109c606d00f972359052bb8c8879a1ecfc1850f (diff)
downloadpostgresql-f75c4fc1dc93d60246df324bf595912d557bcba6.tar.gz
postgresql-f75c4fc1dc93d60246df324bf595912d557bcba6.zip
Use JsonbIteratorToken consistently in automatic variable declarations.
Many functions stored JsonbIteratorToken values in variables of other integer types. Also, standardize order relative to other declarations. Expect compilers to generate the same code before and after this change.
Diffstat (limited to 'src/backend/utils/adt/jsonb_gin.c')
-rw-r--r--src/backend/utils/adt/jsonb_gin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/jsonb_gin.c b/src/backend/utils/adt/jsonb_gin.c
index 2591c81f3d6..204fb8b5919 100644
--- a/src/backend/utils/adt/jsonb_gin.c
+++ b/src/backend/utils/adt/jsonb_gin.c
@@ -70,8 +70,8 @@ gin_extract_jsonb(PG_FUNCTION_ARGS)
int total = 2 * JB_ROOT_COUNT(jb);
JsonbIterator *it;
JsonbValue v;
- int i = 0,
- r;
+ JsonbIteratorToken r;
+ int i = 0;
Datum *entries;
/* If the root level is empty, we certainly have no keys */
@@ -333,10 +333,10 @@ gin_extract_jsonb_path(PG_FUNCTION_ARGS)
int total = 2 * JB_ROOT_COUNT(jb);
JsonbIterator *it;
JsonbValue v;
+ JsonbIteratorToken r;
PathHashStack tail;
PathHashStack *stack;
- int i = 0,
- r;
+ int i = 0;
Datum *entries;
/* If the root level is empty, we certainly have no keys */
@@ -429,7 +429,7 @@ gin_extract_jsonb_path(PG_FUNCTION_ARGS)
stack = parent;
break;
default:
- elog(ERROR, "invalid JsonbIteratorNext rc: %d", r);
+ elog(ERROR, "invalid JsonbIteratorNext rc: %d", (int) r);
}
}