summaryrefslogtreecommitdiff
path: root/src/listen.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-08 22:31:41 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-08 22:31:41 -0700
commit9a74512ffdc1628f1b87d2191439915c63b9104f (patch)
tree8a58dec4a8604228908b09cdb69a286d89c271d2 /src/listen.c
parent4033226105fa861ab5f0276850afc24c0fa45406 (diff)
downloadxorg-lib-libICE-9a74512ffdc1628f1b87d2191439915c63b9104f.tar.gz
Stop casting return values from malloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/listen.c')
-rw-r--r--src/listen.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/listen.c b/src/listen.c
index 0bf1a80..9a449ae 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -62,8 +62,7 @@ IceListenForConnections (
return (0);
}
- if ((listenObjs = (struct _IceListenObj *) malloc (
- transCount * sizeof (struct _IceListenObj))) == NULL)
+ if ((listenObjs = malloc (transCount * sizeof (struct _IceListenObj))) == NULL)
{
for (i = 0; i < transCount; i++)
_IceTransClose (transConns[i]);
@@ -99,8 +98,7 @@ IceListenForConnections (
}
else
{
- *listenObjsRet = (IceListenObj *) malloc (
- *countRet * sizeof (IceListenObj));
+ *listenObjsRet = malloc (*countRet * sizeof (IceListenObj));
if (*listenObjsRet == NULL)
{
@@ -112,8 +110,7 @@ IceListenForConnections (
{
for (i = 0; i < *countRet; i++)
{
- (*listenObjsRet)[i] = (IceListenObj) malloc (
- sizeof (struct _IceListenObj));
+ (*listenObjsRet)[i] = malloc (sizeof (struct _IceListenObj));
if ((*listenObjsRet)[i] == NULL)
{
@@ -196,7 +193,7 @@ IceComposeNetworkIdList (
for (i = 0; i < count; i++)
len += (strlen (listenObjs[i]->network_id) + 1);
- list = (char *) malloc (len);
+ list = malloc (len);
if (list == NULL)
return (NULL);