From 22c5705f81717dd0622ebfb13a617e6104d1fbd9 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Sun, 11 Oct 2015 23:53:35 -0400 Subject: 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. --- src/backend/utils/adt/jsonb_gin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/backend/utils/adt/jsonb_gin.c') diff --git a/src/backend/utils/adt/jsonb_gin.c b/src/backend/utils/adt/jsonb_gin.c index 069ee030803..86dbfdb4f23 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); } } -- cgit v1.2.3