From f7a605f636d62935b80f9905575d40bc4eeca5ae Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Fri, 15 Apr 2022 07:47:12 -0400 Subject: 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. --- src/backend/parser/parse_expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/parser/parse_expr.c') diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 5fc0b1763c8..33eb19a33fc 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -3569,7 +3569,7 @@ coerceJsonFuncExpr(ParseState *pstate, Node *expr, location = exprLocation(expr); if (location < 0) - location = returning ? returning->format->location : -1; + location = returning->format->location; /* special case for RETURNING bytea FORMAT json */ if (returning->format->format_type == JS_FORMAT_JSON && -- cgit v1.2.3