Skip to content

Commit f7a605f

Browse files
committed
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.
1 parent 5cd1c40 commit f7a605f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/parser/parse_expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3569,7 +3569,7 @@ coerceJsonFuncExpr(ParseState *pstate, Node *expr,
35693569
location = exprLocation(expr);
35703570

35713571
if (location < 0)
3572-
location = returning ? returning->format->location : -1;
3572+
location = returning->format->location;
35733573

35743574
/* special case for RETURNING bytea FORMAT json */
35753575
if (returning->format->format_type == JS_FORMAT_JSON &&

src/backend/utils/adt/jsonb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ JsonbUnquote(Jsonb *jb)
22642264
{
22652265
JsonbValue v;
22662266

2267-
JsonbExtractScalar(&jb->root, &v);
2267+
(void) JsonbExtractScalar(&jb->root, &v);
22682268

22692269
if (v.type == jbvString)
22702270
return pnstrdup(v.val.string.val, v.val.string.len);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy