summaryrefslogtreecommitdiffstats
path: root/sdpd
diff options
context:
space:
mode:
Diffstat (limited to 'sdpd')
-rw-r--r--sdpd/cstate.c2
-rw-r--r--sdpd/main.c2
-rw-r--r--sdpd/request.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/sdpd/cstate.c b/sdpd/cstate.c
index d09e9423..ad23f4ec 100644
--- a/sdpd/cstate.c
+++ b/sdpd/cstate.c
@@ -63,7 +63,7 @@ sdp_buf_t *sdp_get_cached_rsp(sdp_cont_state_t *cstate)
uint32_t sdp_cstate_alloc_buf(sdp_buf_t *buf)
{
- sdp_cstate_list_t *cstate = (sdp_cstate_list_t *)malloc(sizeof(sdp_cstate_list_t));
+ sdp_cstate_list_t *cstate = malloc(sizeof(sdp_cstate_list_t));
uint8_t *data = malloc(buf->data_size);
memcpy(data, buf->data, buf->data_size);
diff --git a/sdpd/main.c b/sdpd/main.c
index 5e415f4a..15a95b05 100644
--- a/sdpd/main.c
+++ b/sdpd/main.c
@@ -174,7 +174,7 @@ static void register_server_service(int public)
versionDTDs = (void **)malloc(sdpServerVnumEntries * sizeof(void *));
dtd = SDP_UINT16;
for (i = 0; i < sdpServerVnumEntries; i++) {
- uint16_t *version = (uint16_t *)malloc(sizeof(uint16_t));
+ uint16_t *version = malloc(sizeof(uint16_t));
*version = sdpVnumArray[i].major;
*version = (*version << 8);
*version |= sdpVnumArray[i].minor;
diff --git a/sdpd/request.c b/sdpd/request.c
index 8f7949b1..0c80d5a9 100644
--- a/sdpd/request.c
+++ b/sdpd/request.c
@@ -96,7 +96,7 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p
case SDP_UINT16:
p += sizeof(uint8_t);
seqlen += sizeof(uint8_t);
- pElem = (char *)malloc(sizeof(uint16_t));
+ pElem = malloc(sizeof(uint16_t));
sdp_put_unaligned(ntohs(sdp_get_unaligned((uint16_t *)p)), (uint16_t *)pElem);
p += sizeof(uint16_t);
seqlen += sizeof(uint16_t);
@@ -104,7 +104,7 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p
case SDP_UINT32:
p += sizeof(uint8_t);
seqlen += sizeof(uint8_t);
- pElem = (char *)malloc(sizeof(uint32_t));
+ pElem = malloc(sizeof(uint32_t));
sdp_put_unaligned(ntohl(sdp_get_unaligned((uint32_t *)p)), (uint32_t *)pElem);
p += sizeof(uint32_t);
seqlen += sizeof(uint32_t);
@@ -112,7 +112,7 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p
case SDP_UUID16:
case SDP_UUID32:
case SDP_UUID128:
- pElem = (char *)malloc(sizeof(uuid_t));
+ pElem = malloc(sizeof(uuid_t));
status = sdp_uuid_extract(p, (uuid_t *)pElem, &localSeqLength);
if (status == 0) {
seqlen += localSeqLength;
@@ -217,7 +217,7 @@ static int sdp_match_uuid(sdp_list_t *search, sdp_list_t *pattern)
// create 128-bit form of the search UUID
uuid128 = sdp_uuid_to_uuid128((uuid_t *)data);
list = sdp_list_find(pattern, uuid128, sdp_uuid128_cmp);
- free(uuid128);
+ bt_free(uuid128);
if (!list)
return 0;
}