From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix some jsonb issues found by Coverity in recent commits. |
Date: | 2014-12-16 15:41:47 |
Message-ID: | E1Y0uFv-0003wh-PI@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix some jsonb issues found by Coverity in recent commits.
Mostly these issues concern the non-use of function results. These
have been changed to use (void) pushJsonbValue(...) instead of assigning
the result to a variable that gets overwritten before it is used.
There is a larger issue that we should possibly examine the API for
pushJsonbValue(), so that instead of returning a value it modifies a
state argument. The current idiom is rather clumsy. However, changing
that requires quite a bit more work, so this change should do for the
moment.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/c8315930e6a34b616d9840985c85eb0d856dd2df
Modified Files
--------------
src/backend/utils/adt/jsonb.c | 16 ++++++++--------
src/backend/utils/adt/jsonfuncs.c | 4 +++-
2 files changed, 11 insertions(+), 9 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-12-16 18:32:57 | pgsql: Fix file descriptor leak after failure of a \setshell command in |
Previous Message | Heikki Linnakangas | 2014-12-16 14:41:11 | pgsql: Misc comment typo fixes. |