mirror of
https://github.com/postgres/postgres.git
synced 2025-04-20 00:42:27 +03:00
Small cleanups in SQL/JSON code
These are to keep Coverity happy. In one case remove a redundant NULL check, and in another explicitly ignore a function result that is already known.
This commit is contained in:
parent
5cd1c40b3c
commit
f7a605f636
@ -3569,7 +3569,7 @@ coerceJsonFuncExpr(ParseState *pstate, Node *expr,
|
|||||||
location = exprLocation(expr);
|
location = exprLocation(expr);
|
||||||
|
|
||||||
if (location < 0)
|
if (location < 0)
|
||||||
location = returning ? returning->format->location : -1;
|
location = returning->format->location;
|
||||||
|
|
||||||
/* special case for RETURNING bytea FORMAT json */
|
/* special case for RETURNING bytea FORMAT json */
|
||||||
if (returning->format->format_type == JS_FORMAT_JSON &&
|
if (returning->format->format_type == JS_FORMAT_JSON &&
|
||||||
|
@ -2264,7 +2264,7 @@ JsonbUnquote(Jsonb *jb)
|
|||||||
{
|
{
|
||||||
JsonbValue v;
|
JsonbValue v;
|
||||||
|
|
||||||
JsonbExtractScalar(&jb->root, &v);
|
(void) JsonbExtractScalar(&jb->root, &v);
|
||||||
|
|
||||||
if (v.type == jbvString)
|
if (v.type == jbvString)
|
||||||
return pnstrdup(v.val.string.val, v.val.string.len);
|
return pnstrdup(v.val.string.val, v.val.string.len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user