summaryrefslogtreecommitdiff
path: root/src/sdp-xml.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-10-27 17:16:05 -0400
committerJohan Hedberg <johan.hedberg@nokia.com>2010-10-27 17:16:05 -0400
commitd91fe19315a0a78eec10adaeac6fc5e46dff5c5b (patch)
tree8154c9ef16b884d24558484c2aac0b96d9c9efe0 /src/sdp-xml.c
parent2f1d6986e5f2bc8539bb056e8c608061c191a79b (diff)
downloadbluez-d91fe19315a0a78eec10adaeac6fc5e46dff5c5b.tar.gz
Get rid of redundant type casts from SDP code
Diffstat (limited to 'src/sdp-xml.c')
-rw-r--r--src/sdp-xml.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/sdp-xml.c b/src/sdp-xml.c
index 4b0520de2..3aa9df04b 100644
--- a/src/sdp-xml.c
+++ b/src/sdp-xml.c
@@ -259,7 +259,7 @@ static void convert_raw_data_to_xml(sdp_data_t *value, int indent_level,
if (hex) {
appender(data, "encoding=\"hex\" ");
- strBuf = (char *) malloc(sizeof(char)
+ strBuf = malloc(sizeof(char)
* ((value->unitSize-1) * 2 + 1));
/* Unit Size seems to include the size for dtd
@@ -276,9 +276,8 @@ static void convert_raw_data_to_xml(sdp_data_t *value, int indent_level,
else {
int j;
/* escape the XML disallowed chars */
- strBuf = (char *)
- malloc(sizeof(char) *
- (value->unitSize + 1 + num_chars_to_escape * 4));
+ strBuf = malloc(sizeof(char) *
+ (value->unitSize + 1 + num_chars_to_escape * 4));
for (i = 0, j = 0; i < length; i++) {
if (value->val.str[i] == '&') {
strBuf[j++] = '&';
@@ -375,8 +374,8 @@ struct conversion_data {
static void convert_raw_attr_to_xml_func(void *val, void *data)
{
- struct conversion_data *cd = (struct conversion_data *) data;
- sdp_data_t *value = (sdp_data_t *) val;
+ struct conversion_data *cd = data;
+ sdp_data_t *value = val;
char buf[STRBUFSIZE];
buf[STRBUFSIZE - 1] = '\0';