X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=extlibs%2Ftinycbor%2Ftinycbor%2Fsrc%2Fcborencoder.c;h=1f69647329a590a6123e05e8c5d82ccb78727d44;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=ef1bc0b7a678efe09713b22eb63cec1e569a0986;hpb=54bee4948cb9b2dd07547ce00a65e67e7a8b8d60;p=platform%2Fupstream%2Fiotivity.git diff --git a/extlibs/tinycbor/tinycbor/src/cborencoder.c b/extlibs/tinycbor/tinycbor/src/cborencoder.c index ef1bc0b..1f69647 100644 --- a/extlibs/tinycbor/tinycbor/src/cborencoder.c +++ b/extlibs/tinycbor/tinycbor/src/cborencoder.c @@ -24,6 +24,10 @@ #define _BSD_SOURCE 1 #define _DEFAULT_SOURCE 1 +#ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS 1 +#endif + #include "cbor.h" #include "cborconstants_p.h" #include "compilersupport_p.h" @@ -286,7 +290,7 @@ static inline CborError encode_number_no_update(CborEncoder *encoder, uint64_t u if (ui < Value8Bit) { *bufstart += shiftedMajorType; } else { - unsigned more = 0; + uint8_t more = 0; if (ui > 0xffU) ++more; if (ui > 0xffffU) @@ -462,10 +466,7 @@ static CborError create_container(CborEncoder *encoder, CborEncoder *container, } else { err = encode_number_no_update(container, length, shiftedMajorType); } - if (err && !isOomError(err)) - return err; - - return CborNoError; + return err; } /**