-remove the build warning
-memory free logic
-changed the structure initialization
Change-Id: Iab788102c0ea259fac54ae43c01fcb504ba8eec3
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2679
Reviewed-by: Naga Ashok Jampani <jn.ashok@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
if (pdu->data)
{
payloadLen = (unsigned char *) pdu->hdr + pdu->length - pdu->data;
- OICFree(pdu);
}
+ OICFree(pdu);
+
return payloadLen;
}
}
// #4. send data to TCP Server
- size_t remainLen = dlen;
+ ssize_t remainLen = dlen;
do
{
- size_t len = send(svritem->u4tcp.fd, data, remainLen, 0);
+ ssize_t len = send(svritem->u4tcp.fd, data, remainLen, 0);
if (-1 == len)
{
if (EWOULDBLOCK != errno)