Skip to content

value: check setn failure in json_object_update_existing/missing - #765

Open
hilbert149 wants to merge 1 commit into
akheron:masterfrom
hilbert149:object-update-return-error
Open

hilbert149 wants to merge 1 commit into
akheron:masterfrom
hilbert149:object-update-return-error

Conversation

@hilbert149

Copy link
Copy Markdown

json_object_update_existing() and json_object_update_missing() ignored the return value of json_object_setn_nocheck(), so they returned 0 (success) even when the set failed. The documentation states that they return 0 on success or -1 on error, and json_object_update() already propagates the error.

json_object_update_existing() and json_object_update_missing() ignored
the return value of json_object_setn_nocheck(), so they returned 0
(success) even when the set failed. The documentation states that
they return 0 on success or -1 on error, and json_object_update()
already propagates the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant