summaryrefslogtreecommitdiff
path: root/Xtransutil.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-30 18:05:05 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-05 20:34:28 -0800
commitb89e1b45198c48996750b5da3d715c10f974243f (patch)
tree7091bd01c843ccaffbff8b06afe91dea4fd8986f /Xtransutil.c
parentff992be7b05483f9a0586a27ee0edb6d99580b84 (diff)
Finish conversion to standard C allocation functions
Commit 4ac40cd5451 started this, by no longer special casing the xserver to include it's former custom allocation functions, this just takes the remaining #defines and pre-substitutes them into the code. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Xtransutil.c')
-rw-r--r--Xtransutil.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Xtransutil.c b/Xtransutil.c
index dd36cae..4128990 100644
--- a/Xtransutil.c
+++ b/Xtransutil.c
@@ -197,11 +197,11 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
if (len > 0) {
if (*addrp && *addrlenp < (len + 1))
{
- xfree ((char *) *addrp);
+ free ((char *) *addrp);
*addrp = NULL;
}
if (!*addrp)
- *addrp = (Xtransaddr *) xalloc (len + 1);
+ *addrp = (Xtransaddr *) malloc (len + 1);
if (*addrp) {
strcpy ((char *) *addrp, hostnamebuf);
*addrlenp = len;
@@ -212,7 +212,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
else
{
if (*addrp)
- xfree ((char *) *addrp);
+ free ((char *) *addrp);
*addrp = NULL;
*addrlenp = 0;
}
@@ -255,7 +255,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
case AF_UNIX:
{
struct sockaddr_un *saddr = (struct sockaddr_un *) addr;
- networkId = (char *) xalloc (3 + strlen (transName) +
+ networkId = (char *) malloc (3 + strlen (transName) +
strlen (hostnamebuf) + strlen (saddr->sun_path));
sprintf (networkId, "%s/%s:%s", transName,
hostnamebuf, saddr->sun_path);
@@ -285,7 +285,7 @@ TRANS(GetMyNetworkId) (XtransConnInfo ciptr)
portnum = ntohs (saddr->sin_port);
snprintf (portnumbuf, sizeof(portnumbuf), "%d", portnum);
- networkId = (char *) xalloc (3 + strlen (transName) +
+ networkId = (char *) malloc (3 + strlen (transName) +
strlen (hostnamebuf) + strlen (portnumbuf));
sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf);
break;
@@ -418,7 +418,7 @@ TRANS(GetPeerNetworkId) (XtransConnInfo ciptr)
}
- hostname = (char *) xalloc (
+ hostname = (char *) malloc (
strlen (ciptr->transptr->TransName) + strlen (addr) + 2);
strcpy (hostname, ciptr->transptr->TransName);
strcat (hostname, "/");