bergzand / NanoCBOR

CBOR library aimed at heavily constrained devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong docstring for nanocbor_put_bstr

TimothyClaeys opened this issue · comments

The docstring on nanocbor_put_bstr states that the return value is the number of bytes written.

int nanocbor_put_bstr(nanocbor_encoder_t *enc, const uint8_t *str, size_t len);

If you look at the source code the return value depends on the call to _fits which either returns 0 or -1. The docstring should probably be updated to something like: