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);
setupstat == IceProtocolSetupIOError)
{
IceCloseConnection (iceConn);
- free ((char *) smcConn);
+ free (smcConn);
return (NULL);
}
else if (setupstat == IceProtocolAlreadyActive)
* may not already have XSMP active on it.
*/
- free ((char *) smcConn);
+ free (smcConn);
if (errorStringRet && errorLength > 0) {
strncpy (errorStringRet, "Internal error in IceOpenConnection",
errorLength);
}
free (smcConn->vendor);
free (smcConn->release);
- free ((char *) smcConn);
+ free (smcConn);
return (NULL);
}
*clientIdRet = reply.client_id;
- smcConn->client_id = (char *) malloc (
- strlen (*clientIdRet) + 1);
-
- strcpy (smcConn->client_id, *clientIdRet);
+ smcConn->client_id = strdup (*clientIdRet);
}
else
{
pData += 4;
for (i = 0; i < count; i++)
- STORE_ARRAY8 (pData, strlen (reasonMsgs[i]), reasonMsgs[i]);
+ STORE_ARRAY8 (pData, strlen (reasonMsgs[i]), reasonMsgs[i]);
IceFlush (iceConn);
while (ptr)
{
next = ptr->next;
- free ((char *) ptr);
+ free (ptr);
ptr = next;
}
-
+
}
- free ((char *) smcConn);
+ free (smcConn);
if (closeStatus == IceClosedNow)
statusRet = SmcClosedNow;
pData += 4;
for (i = 0; i < numProps; i++)
- STORE_ARRAY8 (pData, strlen (propNames[i]), propNames[i]);
+ STORE_ARRAY8 (pData, strlen (propNames[i]), propNames[i]);
IceFlush (iceConn);
}
IceConn iceConn = smcConn->iceConn;
_SmcPropReplyWait *wait, *ptr;
- if ((wait = (_SmcPropReplyWait *) malloc (
- sizeof (_SmcPropReplyWait))) == NULL)
+ if ((wait = malloc (sizeof (_SmcPropReplyWait))) == NULL)
{
return (0);
}
smInteractRequestMsg *pMsg;
_SmcInteractWait *wait, *ptr;
- if ((wait = (_SmcInteractWait *) malloc (
- sizeof (_SmcInteractWait))) == NULL)
+ if ((wait = malloc (sizeof (_SmcInteractWait))) == NULL)
{
return (0);
}
wait = smcConn->phase2_wait;
else
{
- if ((wait = (_SmcPhase2Wait *) malloc (
- sizeof (_SmcPhase2Wait))) == NULL)
+ if ((wait = malloc (sizeof (_SmcPhase2Wait))) == NULL)
{
return (0);
}