Commit d333ddb2 authored by Iurii Metelytsia's avatar Iurii Metelytsia

[IOT-3295] Test CT2.3.1 fails fix

	Reverts ocpayload.c to commit e64d33ffSigned-off-by: default avatarIurii Metelytsia <i.metelytsia@samsung.com>
Change-Id: Ib88b999ef911bcfb61bfd32f97900b529af7ccee
parent f29611f4
...@@ -902,7 +902,10 @@ size_t OC_CALL calcDimTotal(const size_t dimensions[MAX_REP_ARRAY_DEPTH]) ...@@ -902,7 +902,10 @@ size_t OC_CALL calcDimTotal(const size_t dimensions[MAX_REP_ARRAY_DEPTH])
} }
size_t total = 1; size_t total = 1;
for(; total < MAX_REP_ARRAY_DEPTH && dimensions[total] != 0; ++total); for(uint8_t i = 0; i < MAX_REP_ARRAY_DEPTH && dimensions[i] != 0; ++i)
{
total *= dimensions[i];
}
return total; return total;
} }
...@@ -1208,7 +1211,7 @@ bool OC_CALL OCRepPayloadSetStringArray(OCRepPayload* payload, const char* name, ...@@ -1208,7 +1211,7 @@ bool OC_CALL OCRepPayloadSetStringArray(OCRepPayload* payload, const char* name,
return false; return false;
} }
char** newArray = (char**)OICCalloc(dimTotal, sizeof(char*)); char** newArray = (char**)OICMalloc(dimTotal * sizeof(char*));
if (!newArray) if (!newArray)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment