if (sourcePort > CA_SUPPORTED_BLE_MAX_PORT ||
sourcePort < CA_SUPPORTED_BLE_MIN_PORT ||
- destPort > CA_SUPPORTED_BLE_MAX_PORT ||
- destPort < CA_BLE_MULTICAST_PORT)
+ destPort > CA_SUPPORTED_BLE_MAX_PORT)
{
OIC_LOG_V(ERROR, TAG, "source port(%d) or destination port(%d) is invalid number!!",
sourcePort, destPort);
const uint8_t *cur_pos = data +
(CA_SUPPORTED_BLE_MTU_SIZE - CA_BLE_HEADER_SIZE - CA_BLE_LENGTH_HEADER_SIZE +
(index * (CA_SUPPORTED_BLE_MTU_SIZE - CA_BLE_HEADER_SIZE)));
- if (cur_pos == NULL)
+ if (NULL == cur_pos)
{
OIC_LOG(ERROR, TAG, "data is NULL");
return CA_STATUS_FAILED;
if (CA_STATUS_OK == CALEGetPortsFromSenderInfo(address, dataInfoList, portList))
{
uint32_t arrayLength = u_arraylist_length(portList);
- for (int i = 0; i < arrayLength; i++)
+ for (uint32_t i = 0; i < arrayLength; i++)
{
uint16_t port = u_arraylist_get(portList, i);
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "port : %X", port);
if (!strncmp(info->remoteEndpoint->addr, leAddress, addrLength))
{
- u_arraylist_add(portList, (void *) info->remoteEndpoint->port);
+ u_arraylist_add(portList, (void *)info->remoteEndpoint->port);
}
}