Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

cn_cbor_decode: set errp with CN_CBOR_NO_ERROR on success #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cn-cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ cn_cbor* cn_cbor_decode(const unsigned char* buf, size_t len CBOR_CONTEXT, cn_cb
pb.err = CN_CBOR_NO_ERROR;
ret = decode_item(&pb CBOR_CONTEXT_PARAM, &catcher);
if (ret != NULL) {
if (errp)
errp->err = CN_CBOR_NO_ERROR;
/* mark as top node */
ret->parent = NULL;
} else {
Expand Down