Archived
Fixed minor error in the example code.
Signed-off-by: pelco <pelco89@gmail.com>
This commit is contained in:
committed by
Thiago Macieira
parent
7b08a99b9e
commit
d75f2ebf65
+3
-3
@@ -76,7 +76,7 @@
|
||||
* \code
|
||||
* uint8_t buf[16];
|
||||
* CborEncoder encoder, mapEncoder;
|
||||
* cbor_encoder_init(&encoder, &buf, sizeof(buf), 0);
|
||||
* cbor_encoder_init(&encoder, buf, sizeof(buf), 0);
|
||||
* cbor_encoder_create_map(&encoder, &mapEncoder, 1);
|
||||
* cbor_encode_text_stringz(&mapEncoder, "foo");
|
||||
* cbor_encode_boolean(&mapEncoder, some_value);
|
||||
@@ -115,7 +115,7 @@
|
||||
* uint8_t buf[16];
|
||||
* CborError err;
|
||||
* CborEncoder encoder, mapEncoder;
|
||||
* cbor_encoder_init(&encoder, &buf, sizeof(buf), 0);
|
||||
* cbor_encoder_init(&encoder, buf, sizeof(buf), 0);
|
||||
* err = cbor_encoder_create_map(&encoder, &mapEncoder, 1);
|
||||
* if (!err)
|
||||
* return err;
|
||||
@@ -155,7 +155,7 @@
|
||||
* goto error;
|
||||
* buf = nbuf;
|
||||
*
|
||||
* cbor_encoder_init(&encoder, &buf, size, 0);
|
||||
* cbor_encoder_init(&encoder, buf, size, 0);
|
||||
* err = cbor_encoder_create_array(&encoder, &arrayEncoder, n);
|
||||
* cbor_assert(err); // can't fail, the buffer is always big enough
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user