From: Peter Geoghegan Date: Fri, 7 Mar 2014 03:17:23 +0000 (-0800) Subject: Minor style tweaks X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ec7b45e40fcc02cb022c56e389a9a300e312b648;p=users%2Fandresfreund%2Fpostgres.git Minor style tweaks --- diff --git a/src/backend/utils/adt/jsonb_gist.c b/src/backend/utils/adt/jsonb_gist.c index 24b676806e..bc53446f3a 100644 --- a/src/backend/utils/adt/jsonb_gist.c +++ b/src/backend/utils/adt/jsonb_gist.c @@ -417,9 +417,9 @@ gjsonb_compress(PG_FUNCTION_ARGS) if (!JB_ISEMPTY(val)) { - int r; - JsonbIterator *it = JsonbIteratorInit(VARDATA(val)); + JsonbIterator *it = JsonbIteratorInit(VARDATA(val)); JsonbValue v; + int r; while((r = JsonbIteratorGet(&it, &v, false)) != 0) { diff --git a/src/backend/utils/adt/jsonb_support.c b/src/backend/utils/adt/jsonb_support.c index 6d328cf68a..0ac42bde5c 100644 --- a/src/backend/utils/adt/jsonb_support.c +++ b/src/backend/utils/adt/jsonb_support.c @@ -757,11 +757,10 @@ JsonbIteratorGet(JsonbIterator **it, JsonbValue *v, bool skipNested) check_stack_depth(); /* - * Encode all possible states by one integer. That's possible because enum - * members of JsonbIterator->state uses different bits than - * JB_FLAG_ARRAY/JB_FLAG_OBJECT. See definition of JsonbIterator + * Encode all possible states by one integer. This is possible because + * enum members of JsonbIterator->state use different bits than + * JB_FLAG_ARRAY/JB_FLAG_OBJECT. See definition of JsonbIterator */ - switch ((*it)->type | (*it)->state) { case JB_FLAG_ARRAY | jbi_start: