summaryrefslogtreecommitdiff
path: root/src/sm_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sm_client.c')
-rw-r--r--src/sm_client.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/sm_client.c b/src/sm_client.c
index faf2b9f..23d8e32 100644
--- a/src/sm_client.c
+++ b/src/sm_client.c
@@ -138,7 +138,7 @@ SmcOpenConnection(char *networkIdsList, SmPointer context,
return (NULL);
}
- if ((smcConn = (SmcConn) malloc (sizeof (struct _SmcConn))) == NULL)
+ if ((smcConn = malloc (sizeof (struct _SmcConn))) == NULL)
{
if (errorStringRet && errorLength > 0) {
strncpy (errorStringRet, "Can't malloc", errorLength);
@@ -158,7 +158,7 @@ SmcOpenConnection(char *networkIdsList, SmPointer context,
setupstat == IceProtocolSetupIOError)
{
IceCloseConnection (iceConn);
- free ((char *) smcConn);
+ free (smcConn);
return (NULL);
}
else if (setupstat == IceProtocolAlreadyActive)
@@ -169,7 +169,7 @@ SmcOpenConnection(char *networkIdsList, SmPointer context,
* may not already have XSMP active on it.
*/
- free ((char *) smcConn);
+ free (smcConn);
if (errorStringRet && errorLength > 0) {
strncpy (errorStringRet, "Internal error in IceOpenConnection",
errorLength);
@@ -235,7 +235,7 @@ SmcOpenConnection(char *networkIdsList, SmPointer context,
}
free (smcConn->vendor);
free (smcConn->release);
- free ((char *) smcConn);
+ free (smcConn);
return (NULL);
}
@@ -330,13 +330,13 @@ SmcCloseConnection(SmcConn smcConn, int count, char **reasonMsgs)
while (ptr)
{
next = ptr->next;
- free ((char *) ptr);
+ free (ptr);
ptr = next;
}
}
- free ((char *) smcConn);
+ free (smcConn);
if (closeStatus == IceClosedNow)
statusRet = SmcClosedNow;
@@ -419,8 +419,7 @@ SmcGetProperties(SmcConn smcConn, SmcPropReplyProc propReplyProc,
IceConn iceConn = smcConn->iceConn;
_SmcPropReplyWait *wait, *ptr;
- if ((wait = (_SmcPropReplyWait *) malloc (
- sizeof (_SmcPropReplyWait))) == NULL)
+ if ((wait = malloc (sizeof (_SmcPropReplyWait))) == NULL)
{
return (0);
}
@@ -454,8 +453,7 @@ SmcInteractRequest(SmcConn smcConn, int dialogType,
smInteractRequestMsg *pMsg;
_SmcInteractWait *wait, *ptr;
- if ((wait = (_SmcInteractWait *) malloc (
- sizeof (_SmcInteractWait))) == NULL)
+ if ((wait = malloc (sizeof (_SmcInteractWait))) == NULL)
{
return (0);
}
@@ -534,8 +532,7 @@ SmcRequestSaveYourselfPhase2(SmcConn smcConn,
wait = smcConn->phase2_wait;
else
{
- if ((wait = (_SmcPhase2Wait *) malloc (
- sizeof (_SmcPhase2Wait))) == NULL)
+ if ((wait = malloc (sizeof (_SmcPhase2Wait))) == NULL)
{
return (0);
}