summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-08 22:31:41 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-08 22:31:41 -0700
commit9a74512ffdc1628f1b87d2191439915c63b9104f (patch)
tree8a58dec4a8604228908b09cdb69a286d89c271d2 /src/misc.c
parent4033226105fa861ab5f0276850afc24c0fa45406 (diff)
Stop casting return values from malloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/misc.c b/src/misc.c
index 1693446..d2e9150 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -57,7 +57,7 @@ IceAllocScratch (
if (iceConn->scratch)
free (iceConn->scratch);
- iceConn->scratch = (char *) malloc ((unsigned) size);
+ iceConn->scratch = malloc (size);
iceConn->scratch_size = size;
}
@@ -421,8 +421,7 @@ _IceAddOpcodeMapping (
}
else if (iceConn->process_msg_info == NULL)
{
- iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc (
- sizeof (_IceProcessMsgInfo));
+ iceConn->process_msg_info = malloc (sizeof (_IceProcessMsgInfo));
iceConn->his_min_opcode = iceConn->his_max_opcode = hisOpcode;
}
else if (hisOpcode < iceConn->his_min_opcode)
@@ -432,7 +431,7 @@ _IceAddOpcodeMapping (
int newsize = iceConn->his_max_opcode - hisOpcode + 1;
int i;
- iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc (
+ iceConn->process_msg_info = malloc (
newsize * sizeof (_IceProcessMsgInfo));
memcpy (&iceConn->process_msg_info[
@@ -459,7 +458,7 @@ _IceAddOpcodeMapping (
int newsize = hisOpcode - iceConn->his_min_opcode + 1;
int i;
- iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc (
+ iceConn->process_msg_info = malloc (
newsize * sizeof (_IceProcessMsgInfo));
memcpy (iceConn->process_msg_info, oldVec,