From: Jaewook Jung Date: Thu, 17 Mar 2016 05:29:16 +0000 (+0900) Subject: fix error for create a new block data X-Git-Tag: 1.2.0+RC1~355^2^2~172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8bf221edc2b29a6684afe8be0b8fd735537f746;p=platform%2Fupstream%2Fiotivity.git fix error for create a new block data Change-Id: I1a90bc9959e2049dd04d12ef90e5476608357681 Signed-off-by: Jaewook Jung Reviewed-on: https://gerrit.iotivity.org/gerrit/5995 Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- diff --git a/resource/csdk/connectivity/src/cablockwisetransfer.c b/resource/csdk/connectivity/src/cablockwisetransfer.c index edcb299..f3447fd 100644 --- a/resource/csdk/connectivity/src/cablockwisetransfer.c +++ b/resource/csdk/connectivity/src/cablockwisetransfer.c @@ -827,8 +827,8 @@ CAResult_t CASetNextBlockOption1(coap_pdu_t *pdu, const CAEndpoint_t *endpoint, return CA_STATUS_FAILED; } - CABlockData_t *currData = CACreateNewBlockData(cadata); - if (!currData) + data = CACreateNewBlockData(cadata); + if (!data) { OIC_LOG(ERROR, TAG, "failed to create a new block data"); CADestroyDataSet(cadata); @@ -1008,8 +1008,8 @@ CAResult_t CASetNextBlockOption2(coap_pdu_t *pdu, const CAEndpoint_t *endpoint, return CA_STATUS_FAILED; } - CABlockData_t *currData = CACreateNewBlockData(cadata); - if (!currData) + data = CACreateNewBlockData(cadata); + if (!data) { OIC_LOG(ERROR, TAG, "failed to create a new block data"); CADestroyDataSet(cadata);