From e77dd2e4bc8227ebdab70b4233cb33ed690fa264 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 19 Nov 2011 10:33:15 -0800 Subject: Remove a bunch of unnecessary casts with malloc & free calls With modern compilers and headers, they cause more problems than they solve and just hide real issues. Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis Reviewed-by: James Cloos --- src/sm_process.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sm_process.c') diff --git a/src/sm_process.c b/src/sm_process.c index b8f1b2c..651ddef 100644 --- a/src/sm_process.c +++ b/src/sm_process.c @@ -267,7 +267,7 @@ _SmcProcessMessage(IceConn iceConn, IcePointer clientData, int opcode, (*smcConn->phase2_wait->phase2_proc) (smcConn, smcConn->phase2_wait->client_data); - free ((char *) smcConn->phase2_wait); + free (smcConn->phase2_wait); smcConn->phase2_wait = NULL; } break; @@ -290,7 +290,7 @@ _SmcProcessMessage(IceConn iceConn, IcePointer clientData, int opcode, (*smcConn->interact_waits->interact_proc) (smcConn, smcConn->interact_waits->client_data); - free ((char *) smcConn->interact_waits); + free (smcConn->interact_waits); smcConn->interact_waits = next; } break; @@ -393,7 +393,7 @@ _SmcProcessMessage(IceConn iceConn, IcePointer clientData, int opcode, (*smcConn->prop_reply_waits->prop_reply_proc) (smcConn, smcConn->prop_reply_waits->client_data, numProps, props); - free ((char *) smcConn->prop_reply_waits); + free (smcConn->prop_reply_waits); smcConn->prop_reply_waits = next; IceDisposeCompleteMessage (iceConn, pStart); @@ -752,7 +752,7 @@ _SmsProcessMessage(IceConn iceConn, IcePointer clientData, int opcode, pData = pStart + 8; - reasonMsgs = (char **) malloc (count * sizeof (char *)); + reasonMsgs = malloc (count * sizeof (char *)); for (i = 0; i < count; i++) EXTRACT_ARRAY8_AS_STRING (pData, swap, reasonMsgs[i]); @@ -839,7 +839,7 @@ _SmsProcessMessage(IceConn iceConn, IcePointer clientData, int opcode, pData = pStart + 8; - propNames = (char **) malloc (count * sizeof (char *)); + propNames = malloc (count * sizeof (char *)); for (i = 0; i < count; i++) EXTRACT_ARRAY8_AS_STRING (pData, swap, propNames[i]); -- cgit v1.2.3