aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_op.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:12:44 -0400
commit22c5705f81717dd0622ebfb13a617e6104d1fbd9 (patch)
tree75f5a3c90ddb5ea121cccc1759f9cf2807d8c1a6 /src/backend/utils/adt/jsonb_op.c
parentc9853e647f247e0bbae1294b24fac40ec7c34550 (diff)
downloadpostgresql-22c5705f81717dd0622ebfb13a617e6104d1fbd9.tar.gz
postgresql-22c5705f81717dd0622ebfb13a617e6104d1fbd9.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_op.c')
-rw-r--r--src/backend/utils/adt/jsonb_op.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/jsonb_op.c b/src/backend/utils/adt/jsonb_op.c
index d9aaac9ac27..17a4d271ec1 100644
--- a/src/backend/utils/adt/jsonb_op.c
+++ b/src/backend/utils/adt/jsonb_op.c
@@ -254,8 +254,8 @@ jsonb_hash(PG_FUNCTION_ARGS)
{
Jsonb *jb = PG_GETARG_JSONB(0);
JsonbIterator *it;
- int32 r;
JsonbValue v;
+ JsonbIteratorToken r;
uint32 hash = 0;
if (JB_ROOT_COUNT(jb) == 0)
@@ -283,7 +283,7 @@ jsonb_hash(PG_FUNCTION_ARGS)
case WJB_END_OBJECT:
break;
default:
- elog(ERROR, "invalid JsonbIteratorNext rc: %d", r);
+ elog(ERROR, "invalid JsonbIteratorNext rc: %d", (int) r);
}
}