1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

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.
This commit is contained in:
Noah Misch
2015-10-11 23:53:35 -04:00
parent f20b26960a
commit 7732d49ca2
5 changed files with 30 additions and 29 deletions

View File

@ -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);
}
}