Merge branch 'master' into windows-port
[platform/upstream/iotivity.git] / resource / csdk / stack / src / ocpayloadconvert.c
index 889c56a..d980cec 100644 (file)
@@ -65,7 +65,7 @@ OCStackResult OCConvertPayload(OCPayload* payload, uint8_t** outPayload, size_t*
     // TinyCbor Version 47a78569c0 or better on master is required for the re-allocation
     // strategy to work.  If you receive the following assertion error, please do a git-pull
     // from the extlibs/tinycbor/tinycbor directory
-    #define CborNeedsUpdating  (CborErrorOutOfMemory < CborErrorDataTooLarge)
+    #define CborNeedsUpdating  (((unsigned int)CborErrorOutOfMemory) < ((unsigned int)CborErrorDataTooLarge))
     OC_STATIC_ASSERT(!CborNeedsUpdating, "tinycbor needs to be updated to at least 47a78569c0");
     #undef CborNeedsUpdating
 
@@ -514,8 +514,7 @@ static int64_t OCConvertPlatformPayload(OCPlatformPayload *payload, uint8_t *out
     // Resource type
     if (payload->rt)
     {
-        err |= ConditionalAddTextStringToMap(&repMap, OC_RSRVD_RESOURCE_TYPE,
-                sizeof(OC_RSRVD_RESOURCE_TYPE) - 1, payload->rt);
+        err |= OCStringLLJoin(&repMap, OC_RSRVD_RESOURCE_TYPE, payload->rt);
         VERIFY_CBOR_SUCCESS(TAG, err, "Failed adding resource type.");
     }