Minor style tweaks
authorPeter Geoghegan <[email protected]>
Fri, 7 Mar 2014 03:17:23 +0000 (19:17 -0800)
committerPeter Geoghegan <[email protected]>
Fri, 7 Mar 2014 03:17:23 +0000 (19:17 -0800)
src/backend/utils/adt/jsonb_gist.c
src/backend/utils/adt/jsonb_support.c

index 24b676806e0f6a0564f1b9f1bf6d8db3db16ed46..bc53446f3ab310080ee4cfa80d4375d95450040f 100644 (file)
@@ -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)
            {
index 6d328cf68a1efb1a872f5729e3131a78f9439f79..0ac42bde5c6c34da504b035ed3a24cc46b6568f3 100644 (file)
@@ -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: