diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-08 22:31:41 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-08 22:31:41 -0700 |
commit | 9a74512ffdc1628f1b87d2191439915c63b9104f (patch) | |
tree | 8a58dec4a8604228908b09cdb69a286d89c271d2 /src/misc.c | |
parent | 4033226105fa861ab5f0276850afc24c0fa45406 (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.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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, |