Remove more dead code
authorPeter Geoghegan <pg@heroku.com>
Thu, 13 Mar 2014 05:43:36 +0000 (22:43 -0700)
committerPeter Geoghegan <pg@heroku.com>
Thu, 13 Mar 2014 05:43:36 +0000 (22:43 -0700)
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonb_support.c

index ddb6e6929c5e1f0f6d679882b688be2c39b12c16..c735ebf94a4d9476f79ef1ff97b52321272c81d5 100644 (file)
@@ -314,8 +314,7 @@ jsonb_in_scalar(void *state, char *token, JsonTokenType tokentype)
            v.type = jbvNull;
            break;
        default:
-           /* nothing else should be here in fact */
-           Assert(false);
+           elog(ERROR, "invalid json token type");
            break;
    }
 
index a791369522760a45d10677b23705a4bea72221bc..add1375496c4fa6d5ce5a7b9ccd05685678b00f9 100644 (file)
@@ -91,11 +91,7 @@ JsonbValueToJsonb(JsonbValue * v)
 {
    Jsonb      *out;
 
-   if (v == NULL)
-   {
-       out = NULL;
-   }
-   else if (v->type >= jbvNull && v->type < jbvArray)
+   if (v->type >= jbvNull && v->type < jbvArray)
    {
        /* Scalar value */
        ToJsonbState *state = NULL;