QCBOR: Add xx_IsBufferNULL(); update docs; endianness options
- xx_IsBufferNULL() allows caller of QCBOREncode to know if
encoding is just a size calculation or a real encoding.
- Large changes to improve documentation and style in the .h
files.
- New #define config options for compiler / OS / CPU specific
endianness conversion that can reduce code size slightly.
No incompatible changes and as before no requirement to
define config for endianness.
Change-Id: Iaa443e6ac39c536dd5ed3b6f1316fd18cb624832
Signed-off-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/lib/ext/qcbor/test/UsefulBuf_Tests.c b/lib/ext/qcbor/test/UsefulBuf_Tests.c
index 388f8cf..f53693a 100644
--- a/lib/ext/qcbor/test/UsefulBuf_Tests.c
+++ b/lib/ext/qcbor/test/UsefulBuf_Tests.c
@@ -238,6 +238,11 @@
return "lengths near max size";
}
+ UsefulOutBuf_Init(&UOB, (UsefulBuf){NULL, 100});
+ if(!UsefulOutBuf_IsBufferNULL(&UOB)) {
+ return "NULL check failed";
+ }
+
return NULL;
}