Commit fc527448 authored by jihwan.seo's avatar jihwan.seo Committed by Erich Keane

remove unnecessary code in protocolmessage

pdu already is checked previously.
it means pdu is not null
so execution cannot reach removed code.

Change-Id: I2cf8a862937f197fb639f41fbf9e355841bad2e3
Signed-off-by: default avatarjihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1034Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarNaga Ashok Jampani <jn.ashok@samsung.com>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent 6ed49d45
......@@ -902,10 +902,6 @@ CAMessageType_t CAGetMessageTypeFromPduBinaryData(const void *pdu, uint32_t size
}
coap_hdr_t *hdr = (coap_hdr_t *) pdu;
if (NULL == hdr)
{
return CA_MSG_NONCONFIRM;
}
return (CAMessageType_t) hdr->type;
}
......@@ -926,10 +922,6 @@ uint16_t CAGetMessageIdFromPduBinaryData(const void *pdu, uint32_t size)
}
coap_hdr_t *hdr = (coap_hdr_t *) pdu;
if (NULL == hdr)
{
return 0;
}
return hdr->id;
}
......@@ -950,11 +942,6 @@ CAResponseResult_t CAGetCodeFromPduBinaryData(const void *pdu, uint32_t size)
}
coap_hdr_t *hdr = (coap_hdr_t *) pdu;
if (NULL == hdr)
{
OIC_LOG(ERROR, TAG, "hdr is null");
return CA_NOT_FOUND;
}
return (CAResponseResult_t) CA_RESPONSE_CODE(hdr->code);
}
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