summaryrefslogtreecommitdiff
path: root/src/sm_process.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-19 10:33:15 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-09 17:37:09 -0800
commite77dd2e4bc8227ebdab70b4233cb33ed690fa264 (patch)
treec40965b2ffd7dc02afac66aca8ce05b6086d8446 /src/sm_process.c
parent46f3ef4460aa2c1c2cba22897694a1cea572d506 (diff)
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 <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: James Cloos <cloos@jhcloos.com>
Diffstat (limited to 'src/sm_process.c')
-rw-r--r--src/sm_process.c10
1 files changed, 5 insertions, 5 deletions
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]);