From a937b4a6c5b89d8b1348b6864a57303163b4bdc3 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Fri, 14 Aug 2015 13:07:00 -0700 Subject: [PATCH] Fixed ConditionalAddTextStringToMap Refactoring changes the function to return an error in the 'null' condition rather than remain a valid value. This patch returns it to its previous behavior by having it return 0 Change-Id: I7a3b42399dec2df3955f2b4ef513fa0ca7433bb8 Signed-off-by: Erich Keane Reviewed-on: https://gerrit.iotivity.org/gerrit/2212 Reviewed-by: Sakthivel Samidurai Reviewed-by: Omkar Hegde Tested-by: jenkins-iotivity --- resource/csdk/stack/src/ocpayloadconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resource/csdk/stack/src/ocpayloadconvert.c b/resource/csdk/stack/src/ocpayloadconvert.c index 7c8db38..a95c618 100644 --- a/resource/csdk/stack/src/ocpayloadconvert.c +++ b/resource/csdk/stack/src/ocpayloadconvert.c @@ -700,5 +700,5 @@ static int64_t AddTextStringToMap(CborEncoder* map, const char* key, size_t keyl static int64_t ConditionalAddTextStringToMap(CborEncoder* map, const char* key, size_t keylen, const char* value) { - return value ? AddTextStringToMap(map, key, keylen, value) : 0 - OC_STACK_INVALID_PARAM; + return value ? AddTextStringToMap(map, key, keylen, value) : 0; } -- 2.7.4