aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-26 01:38:22 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:05:30 +0200
commitacf87144d019f18e646501657d9082c6eba77f54 (patch)
treedadb838cd54010836230358a4a5805bb0696b5bb /nx-X11/lib
parent279d37127db241a9ee685f6b671f51aa21a972ea (diff)
downloadnx-libs-acf87144d019f18e646501657d9082c6eba77f54.tar.gz
nx-libs-acf87144d019f18e646501657d9082c6eba77f54.tar.bz2
nx-libs-acf87144d019f18e646501657d9082c6eba77f54.zip
nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead.
Fixes ArcticaProject/nx-libs#105
Diffstat (limited to 'nx-X11/lib')
-rw-r--r--nx-X11/lib/xtrans/Xtrans.c52
-rw-r--r--nx-X11/lib/xtrans/Xtransdnet.c10
-rw-r--r--nx-X11/lib/xtrans/Xtranslcl.c20
-rw-r--r--nx-X11/lib/xtrans/Xtransos2.c76
-rw-r--r--nx-X11/lib/xtrans/Xtranssock.c30
-rw-r--r--nx-X11/lib/xtrans/Xtranstli.c28
-rw-r--r--nx-X11/lib/xtrans/Xtransutil.c4
-rw-r--r--nx-X11/lib/xtrans/transport.c1
8 files changed, 110 insertions, 111 deletions
diff --git a/nx-X11/lib/xtrans/Xtrans.c b/nx-X11/lib/xtrans/Xtrans.c
index ef4d64aed..f1e5ff966 100644
--- a/nx-X11/lib/xtrans/Xtrans.c
+++ b/nx-X11/lib/xtrans/Xtrans.c
@@ -145,15 +145,15 @@ TRANS(FreeConnInfo) (XtransConnInfo ciptr)
PRMSG (3,"FreeConnInfo(%p)\n", ciptr, 0, 0);
if (ciptr->addr)
- xfree (ciptr->addr);
+ free (ciptr->addr);
if (ciptr->peeraddr)
- xfree (ciptr->peeraddr);
+ free (ciptr->peeraddr);
if (ciptr->port)
- xfree (ciptr->port);
+ free (ciptr->port);
- xfree ((char *) ciptr);
+ free ((char *) ciptr);
}
@@ -238,7 +238,7 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
*protocol = NULL;
*host = NULL;
*port = NULL;
- xfree (tmpptr);
+ free (tmpptr);
return 0;
}
@@ -288,7 +288,7 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
*protocol = NULL;
*host = NULL;
*port = NULL;
- xfree (tmpptr);
+ free (tmpptr);
return 0;
}
@@ -368,7 +368,7 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
*port = NULL;
*host = NULL;
*protocol = NULL;
- xfree (tmpptr);
+ free (tmpptr);
return 0;
}
else
@@ -379,9 +379,9 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
/* Malloc failed */
*port = NULL;
*host = NULL;
- xfree (*protocol);
+ free (*protocol);
*protocol = NULL;
- xfree (tmpptr);
+ free (tmpptr);
return 0;
}
else
@@ -391,17 +391,17 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port)
{
/* Malloc failed */
*port = NULL;
- xfree (*host);
+ free (*host);
*host = NULL;
- xfree (*protocol);
+ free (*protocol);
*protocol = NULL;
- xfree (tmpptr);
+ free (tmpptr);
return 0;
}
else
strcpy (*port, _port);
- xfree (tmpptr);
+ free (tmpptr);
return 1;
}
@@ -446,9 +446,9 @@ TRANS(Open) (int type, char *address)
PRMSG (1,"Open: Unable to find transport for %s\n",
protocol, 0, 0);
- xfree (protocol);
- xfree (host);
- xfree (port);
+ free (protocol);
+ free (host);
+ free (port);
return NULL;
}
@@ -487,17 +487,17 @@ TRANS(Open) (int type, char *address)
PRMSG (1,"Open: transport open failed for %s/%s:%s\n",
protocol, host, port);
}
- xfree (protocol);
- xfree (host);
- xfree (port);
+ free (protocol);
+ free (host);
+ free (port);
return NULL;
}
ciptr->transptr = thistrans;
ciptr->port = port; /* We need this for TRANS(Reopen) */
- xfree (protocol);
- xfree (host);
+ free (protocol);
+ free (host);
return ciptr;
}
@@ -859,16 +859,16 @@ TRANS(Connect) (XtransConnInfo ciptr, char *address)
{
PRMSG (1,"Connect: Missing port specification in %s\n",
address, 0, 0);
- if (protocol) xfree (protocol);
- if (host) xfree (host);
+ if (protocol) free (protocol);
+ if (host) free (host);
return -1;
}
ret = ciptr->transptr->Connect (ciptr, host, port);
- if (protocol) xfree (protocol);
- if (host) xfree (host);
- if (port) xfree (port);
+ if (protocol) free (protocol);
+ if (host) free (host);
+ if (port) free (port);
return ret;
}
diff --git a/nx-X11/lib/xtrans/Xtransdnet.c b/nx-X11/lib/xtrans/Xtransdnet.c
index a1728f187..34e191260 100644
--- a/nx-X11/lib/xtrans/Xtransdnet.c
+++ b/nx-X11/lib/xtrans/Xtransdnet.c
@@ -224,7 +224,7 @@ TRANS(DNETOpenCOTSServer) (Xtransport *thistrans, char *protocol,
if ((ciptr->fd = socket (AF_DECnet, SOCK_STREAM, 0)) < 0)
{
- xfree ((char *) ciptr);
+ free ((char *) ciptr);
return NULL;
}
@@ -406,7 +406,7 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status)
{
PRMSG (1, "DNETAccept: accept() failed\n", 0, 0, 0);
- xfree (newciptr);
+ free (newciptr);
*status = TRANS_ACCEPT_FAILED;
return NULL;
}
@@ -421,7 +421,7 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status)
PRMSG(1,
"DNETAccept: ...DNETGetAddr() failed:\n", 0, 0, 0);
close (newciptr->fd);
- xfree (newciptr);
+ free (newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -432,8 +432,8 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status)
"DNETAccept: ...DNETGetPeerAddr() failed:\n", 0, 0, 0);
close (newciptr->fd);
- if (newciptr->addr) xfree (newciptr->addr);
- xfree (newciptr);
+ if (newciptr->addr) free (newciptr->addr);
+ free (newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
diff --git a/nx-X11/lib/xtrans/Xtranslcl.c b/nx-X11/lib/xtrans/Xtranslcl.c
index 6165d3658..c1689c654 100644
--- a/nx-X11/lib/xtrans/Xtranslcl.c
+++ b/nx-X11/lib/xtrans/Xtranslcl.c
@@ -171,7 +171,7 @@ TRANS(FillAddrInfo)(XtransConnInfo ciptr, char *sun_path, char *peer_sun_path)
PRMSG(1,
"FillAddrInfo: failed to allocate memory for peer addr\n",
0,0,0);
- xfree ((char *) sunaddr);
+ free ((char *) sunaddr);
ciptr->addr = NULL;
return 0;
@@ -610,7 +610,7 @@ TRANS(PTSAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
if( (sunaddr=(struct sockaddr_un *)xalloc(newciptr->peeraddrlen)) == NULL ) {
PRMSG(1,"PTSAccept: failed to allocate memory for peer addr\n",
0,0,0);
- xfree(newciptr->addr);
+ free(newciptr->addr);
close(newfd);
*status = TRANS_ACCEPT_BAD_MALLOC;
return -1;
@@ -834,7 +834,7 @@ TRANS(NAMEDAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
PRMSG(1,
"NAMEDAccept: failed to allocate memory for peer addr\n",
0,0,0);
- xfree(newciptr->addr);
+ free(newciptr->addr);
close(str.fd);
*status = TRANS_ACCEPT_BAD_MALLOC;
return -1;
@@ -1178,7 +1178,7 @@ TRANS(ISCAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
PRMSG(1,
"ISCAccept: failed to allocate memory for peer addr\n",
0,0,0);
- xfree(newciptr->addr);
+ free(newciptr->addr);
close(str.fd);
*status = TRANS_ACCEPT_BAD_MALLOC;
return -1;
@@ -1455,7 +1455,7 @@ TRANS(SCOAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
PRMSG(1,
"SCOAccept: failed to allocate memory for peer addr\n",
0,0,0);
- xfree(newciptr->addr);
+ free(newciptr->addr);
close(fd);
*status = TRANS_ACCEPT_BAD_MALLOC;
return -1;
@@ -1913,7 +1913,7 @@ TRANS(LocalEndTransports)(void)
{
PRMSG(3,"LocalEndTransports()\n", 0,0,0 );
- xfree(freeXLOCAL);
+ free(freeXLOCAL);
}
#define TYPEBUFSIZE 32
@@ -2080,7 +2080,7 @@ TRANS(LocalOpenClient)(int type, char *protocol, char *host, char *port)
if( ciptr->fd < 0 )
{
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -2150,7 +2150,7 @@ TRANS(LocalOpenServer)(int type, char *protocol, char *host, char *port)
}
}
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -2197,7 +2197,7 @@ TRANS(LocalReopenServer)(int type, int index, int fd, char *port)
return ciptr;
}
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -2396,7 +2396,7 @@ TRANS(LocalAccept)(XtransConnInfo ciptr, int *status)
if( newciptr->fd < 0 )
{
- xfree(newciptr);
+ free(newciptr);
return NULL;
}
diff --git a/nx-X11/lib/xtrans/Xtransos2.c b/nx-X11/lib/xtrans/Xtransos2.c
index f4a6b036b..807a6029d 100644
--- a/nx-X11/lib/xtrans/Xtransos2.c
+++ b/nx-X11/lib/xtrans/Xtransos2.c
@@ -111,7 +111,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
0,0,0 );
PRMSG(1,"\tor the DISPLAY variable is set incorrectly.\n",
0,0,0 );
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
try ++;
@@ -133,7 +133,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
pipe_len=0;
DosWrite(hServer,&pipe_len,1,&byteWritten);
DosClose(hServer);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -145,7 +145,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG(1, "Os2OpenClient: Unable to connect to pipe %s\n", pipename,0,0 );
DosClose (hfd);
DosClose(hServer);
- xfree(ciptr);
+ free(ciptr);
return (NULL);
}
@@ -158,7 +158,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
hServer,rc,byteWritten );
DosClose(hServer);
DosClose(hfd);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -182,7 +182,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG(1, "\tor the XServer is too busy to respond.\n",0,0,0 );
DosClose(hServer);
DosClose(hfd);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -197,7 +197,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG(1, "Os2OpenClient: Client pipe does not appear connected. rc=%d, h=%d\n",rc,hfd,0 );
PRMSG(1, "\tProbable cause: the XServer has just exited.\n",0,0,0 );
DosClose(hfd);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -207,7 +207,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG (1, "Os2OpenClient: Can't allocate space for the addr\n",
0, 0, 0);
DosClose(hfd);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
ciptr->addrlen = namelen;
@@ -219,8 +219,8 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG (1, "Os2OpenCLient: Can't allocate space for the addr\n",
0, 0, 0);
DosClose(hfd);
- xfree(ciptr->addr);
- xfree(ciptr);
+ free(ciptr->addr);
+ free(ciptr);
return(NULL);
}
ciptr->peeraddrlen = namelen;
@@ -237,9 +237,9 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG(1, "Os2OpenClient: Could not import the pipe handle into EMX\n",0,0,0 );
PRMSG(1, "\tProbable cause: EMX has run out of free file handles.\n",0,0,0 );
DosClose(hfd);
- xfree(ciptr->addr);
- xfree(ciptr->peeraddr);
- xfree(ciptr);
+ free(ciptr->addr);
+ free(ciptr->peeraddr);
+ free(ciptr);
return(NULL);
}
PRMSG(5, "Os2OpenClient: pipe handle %d EMX handle %d\n",ciptr->index,ciptr->fd,0 );
@@ -296,7 +296,7 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
PRMSG(1, "Os2OpenServer: Unable to create pipe %s, rc=%d\n", pipename,rc,0 );
PRMSG(1, "\tProbable cause: there is already another XServer running on display :%s\n",port,0,0 );
DosClose(hfd);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -307,7 +307,7 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
{
PRMSG(1, "Os2OpenServer: Unable to connect to pipe %s\n", pipename,0,0 );
DosClose (hfd);
- xfree(ciptr);
+ free(ciptr);
return (NULL);
}
@@ -321,7 +321,7 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
PRMSG (1, "Os2OpenServer: Can't allocate space for the addr\n",
0, 0, 0);
DosClose(hfd);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
ciptr->addrlen = namelen;
@@ -333,8 +333,8 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
PRMSG (1, "Os2OpenServer: Can't allocate space for the addr\n",
0, 0, 0);
DosClose(hfd);
- xfree(ciptr->addr);
- xfree(ciptr);
+ free(ciptr->addr);
+ free(ciptr);
return(NULL);
}
@@ -351,9 +351,9 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
if((ciptr->fd=_imphandle(hfd))<0){
DosClose(hfd);
- xfree(ciptr->addr);
- xfree(ciptr->peeraddr);
- xfree(ciptr);
+ free(ciptr->addr);
+ free(ciptr->peeraddr);
+ free(ciptr);
return(NULL);
}
PRMSG(5, "Os2OpenServer: Pipe handle %d EMX handle %d",ciptr->index,ciptr->fd,0 );
@@ -365,9 +365,9 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
PRMSG(1, "Os2OpenCOTSServer: Could not attach sem %d to pipe %d, rc=%d\n",
hPipeSem,ciptr->fd,rc);
DosClose(ciptr->fd);
- xfree(ciptr->addr);
- xfree(ciptr->peeraddr);
- xfree(ciptr);
+ free(ciptr->addr);
+ free(ciptr->peeraddr);
+ free(ciptr);
return(NULL);
}
#endif
@@ -445,7 +445,7 @@ TRANS(Os2ReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
{
PRMSG (1, "Os2ReopenCOTSServer: Can't allocate space for the addr\n",
0, 0, 0);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -455,7 +455,7 @@ TRANS(Os2ReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
{
PRMSG (1, "Os2ReopenCOTSServer: Can't allocate space for the addr\n",
0, 0, 0);
- xfree(ciptr);
+ free(ciptr);
return(NULL);
}
@@ -521,7 +521,7 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG(2,"Os2Accept: Error reading incoming connection, in=%d, error=%d\n",
in,errno,0 );
*status = TRANS_ACCEPT_MISC_ERROR;
- xfree(newciptr);
+ free(newciptr);
rc = DosDisConnectNPipe(ciptr->fd);
rc = DosConnectNPipe (ciptr->fd);
if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED)
@@ -540,7 +540,7 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG(2,"Os2Accept: Error reading incoming connection, in=%d, error=%d\n",
in,errno,0 );
*status = TRANS_ACCEPT_MISC_ERROR;
- xfree(newciptr);
+ free(newciptr);
rc = DosDisConnectNPipe(ciptr->fd);
rc = DosConnectNPipe (ciptr->fd);
if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED)
@@ -566,7 +566,7 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG(1,"Os2Accept: Open pipe %s to client failed, rc=%d\n",
clientname,rc,0 );
PRMSG(1, "\tProbable cause: the client has exited or timed-out.\n",0,0,0 );
- xfree(newciptr);
+ free(newciptr);
rc = DosDisConnectNPipe(ciptr->fd);
rc = DosConnectNPipe (ciptr->fd);
if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED)
@@ -581,7 +581,7 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
{
PRMSG(1,"Os2Accept: Could not set pipe %s to non-blocking mode, rc=%d\n",
hClient,rc,0 );
- xfree(newciptr);
+ free(newciptr);
rc = DosDisConnectNPipe(ciptr->fd);
rc = DosConnectNPipe (ciptr->fd);
if (rc != 0 && rc != ERROR_PIPE_NOT_CONNECTED)
@@ -610,7 +610,7 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG (1, "Os2Accept: Can't allocate space for the addr\n",
0, 0, 0);
DosClose(hClient);
- xfree(newciptr);
+ free(newciptr);
return(NULL);
}
@@ -623,8 +623,8 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG (1, "Os2Accept: Can't allocate space for the addr\n",
0, 0, 0);
DosClose(hClient);
- xfree(ciptr->addr);
- xfree(newciptr);
+ free(ciptr->addr);
+ free(newciptr);
return(NULL);
}
@@ -643,9 +643,9 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
hClient,errno,0 );
PRMSG(1, "\tProbable cause: EMX has run out of file handles.\n",0,0,0 );
DosClose(hClient);
- xfree(newciptr->addr);
- xfree(newciptr->peeraddr);
- xfree(newciptr);
+ free(newciptr->addr);
+ free(newciptr->peeraddr);
+ free(newciptr);
return(NULL);
}
PRMSG(5, "Os2Accept: Pipe handle %d EMX handle %d",newciptr->index,newciptr->fd,0 );
@@ -657,9 +657,9 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG(1, "Os2OpenCOTSServer: Could not attach sem %d to pipe %d, rc=%d\n",
hPipeSem,newciptr->fd,rc);
DosClose(newciptr->fd);
- xfree(newciptr->addr);
- xfree(newciptr->peeraddr);
- xfree(newciptr);
+ free(newciptr->addr);
+ free(newciptr->peeraddr);
+ free(newciptr);
return(NULL);
}
#endif
diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c
index 5c57fc5ba..6a6600435 100644
--- a/nx-X11/lib/xtrans/Xtranssock.c
+++ b/nx-X11/lib/xtrans/Xtranssock.c
@@ -619,7 +619,7 @@ static XtransConnInfo TRANS(SocketCreateConnInfo) ()
if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fds) < 0)
{
PRMSG (1, "SocketCreateConnInfo: socketpair() failed.\n", 0, 0, 0);
- xfree ((char *) ciptr);
+ free ((char *) ciptr);
return NULL;
}
@@ -643,7 +643,7 @@ static XtransConnInfo TRANS(SocketCreateConnInfo) ()
{
PRMSG (1, "SocketCreateConnInfo: No space for a new _NXProxyConnInfo for [%d].\n",
ciptr->fd, 0, 0);
- xfree ((char *) ciptr);
+ free ((char *) ciptr);
return NULL;
}
else if (_NXProxyConnInfoTab[ciptr->fd] != NULL)
@@ -658,7 +658,7 @@ static XtransConnInfo TRANS(SocketCreateConnInfo) ()
if (_NXProxyConnInfoTab[ciptr->fd] == NULL)
{
PRMSG (1, "SocketCreateConnInfo: Alloc of _NXProxyConnInfo failed.\n", 0, 0, 0);
- xfree ((char *) ciptr);
+ free ((char *) ciptr);
return NULL;
}
@@ -812,7 +812,7 @@ static void TRANS(SocketCloseConnInfo) (XtransConnInfo ciptr)
ciptr->fd);
#endif
- xfree((char *) _NXProxyConnInfoTab[ciptr->fd]);
+ free((char *) _NXProxyConnInfoTab[ciptr->fd]);
_NXProxyConnInfoTab[ciptr->fd] = NULL;
@@ -1084,7 +1084,7 @@ TRANS(SocketOpen) (int i, int type)
PRMSG (2, "SocketOpen: socket() failed for %s\n",
Sockettrans2devtab[i].transname, 0, 0);
- xfree ((char *) ciptr);
+ free ((char *) ciptr);
return NULL;
}
@@ -1968,7 +1968,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
errno = WSAGetLastError();
#endif
PRMSG (1, "SocketINETAccept: accept() failed\n", 0, 0, 0);
- xfree (newciptr);
+ free (newciptr);
*status = TRANS_ACCEPT_FAILED;
return NULL;
}
@@ -1996,7 +1996,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
"SocketINETAccept: ...SocketINETGetAddr() failed:\n",
0, 0, 0);
close (newciptr->fd);
- xfree (newciptr);
+ free (newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -2007,8 +2007,8 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status)
"SocketINETAccept: ...SocketINETGetPeerAddr() failed:\n",
0, 0, 0);
close (newciptr->fd);
- if (newciptr->addr) xfree (newciptr->addr);
- xfree (newciptr);
+ if (newciptr->addr) free (newciptr->addr);
+ free (newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -2048,7 +2048,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
(struct sockaddr *) &sockname, (void *)&namelen)) < 0)
{
PRMSG (1, "SocketUNIXAccept: accept() failed\n", 0, 0, 0);
- xfree (newciptr);
+ free (newciptr);
*status = TRANS_ACCEPT_FAILED;
return NULL;
}
@@ -2064,7 +2064,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
"SocketUNIXAccept: Can't allocate space for the addr\n",
0, 0, 0);
close (newciptr->fd);
- xfree (newciptr);
+ free (newciptr);
*status = TRANS_ACCEPT_BAD_MALLOC;
return NULL;
}
@@ -2084,8 +2084,8 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status)
"SocketUNIXAccept: Can't allocate space for the addr\n",
0, 0, 0);
close (newciptr->fd);
- if (newciptr->addr) xfree (newciptr->addr);
- xfree (newciptr);
+ if (newciptr->addr) free (newciptr->addr);
+ free (newciptr);
*status = TRANS_ACCEPT_BAD_MALLOC;
return NULL;
}
@@ -2263,7 +2263,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
" socketfor IPv4 address\n", 0,0,0);
}
if (newciptr)
- xfree(newciptr);
+ free(newciptr);
} else {
socketaddr = NULL;
PRMSG (4,"SocketINETConnect Skipping IPv4 address\n",
@@ -2301,7 +2301,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
"socket for IPv6 address\n", 0,0,0);
}
if (newciptr)
- xfree(newciptr);
+ free(newciptr);
}
else
{
diff --git a/nx-X11/lib/xtrans/Xtranstli.c b/nx-X11/lib/xtrans/Xtranstli.c
index d8b5db83b..ab37275dd 100644
--- a/nx-X11/lib/xtrans/Xtranstli.c
+++ b/nx-X11/lib/xtrans/Xtranstli.c
@@ -171,7 +171,7 @@ TRANS(TLIGetAddr)(XtransConnInfo ciptr)
*/
if( ciptr->addr )
- xfree(ciptr->addr);
+ free(ciptr->addr);
if( (ciptr->addr=(char *)xalloc(netbuf.len)) == NULL )
{
@@ -221,7 +221,7 @@ TRANS(TLIGetPeerAddr)(XtransConnInfo ciptr)
*/
if( ciptr->peeraddr )
- xfree(ciptr->peeraddr);
+ free(ciptr->peeraddr);
if( (ciptr->peeraddr=(char *)xalloc(netbuf.len)) == NULL )
{
@@ -457,7 +457,7 @@ TRANS(TLIOpenCOTSClient)(Xtransport *thistrans, char *protocol,
"TLIOpenCOTSClient: ...TLITLIBindLocal() failed: %d\n",
errno, 0,0 );
t_close(ciptr->fd);
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -467,7 +467,7 @@ TRANS(TLIOpenCOTSClient)(Xtransport *thistrans, char *protocol,
"TLIOpenCOTSClient: ...TLIGetAddr() failed: %d\n",
errno, 0,0 );
t_close(ciptr->fd);
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -557,7 +557,7 @@ TRANS(TLIOpenCLTSClient)(Xtransport *thistrans, char *protocol,
"TLIOpenCLTSClient: ...TLITLIBindLocal() failed: %d\n",
errno, 0,0 );
t_close(ciptr->fd);
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -567,7 +567,7 @@ TRANS(TLIOpenCLTSClient)(Xtransport *thistrans, char *protocol,
"TLIOpenCLTSClient: ...TLIGetPeerAddr() failed: %d\n",
errno, 0,0 );
t_close(ciptr->fd);
- xfree(ciptr);
+ free(ciptr);
return NULL;
}
@@ -917,7 +917,7 @@ TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
errno, 0,0 );
t_free((char *)call,T_CALL);
t_close(newciptr->fd);
- xfree(newciptr);
+ free(newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -961,7 +961,7 @@ TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
"TLIAccept: TRANS(TLIGetPeerAddr)() failed: %d\n",
errno, 0,0 );
t_close(newciptr->fd);
- xfree(newciptr);
+ free(newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -972,8 +972,8 @@ TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
"TLIAccept: TRANS(TLIGetPeerAddr)() failed: %d\n",
errno, 0,0 );
t_close(newciptr->fd);
- xfree(newciptr->addr);
- xfree(newciptr);
+ free(newciptr->addr);
+ free(newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -983,8 +983,8 @@ TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
PRMSG(1, "TLIAccept() ioctl(I_POP, \"timod\") failed %d\n",
errno,0,0 );
t_close(newciptr->fd);
- xfree(newciptr->addr);
- xfree(newciptr);
+ free(newciptr->addr);
+ free(newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
@@ -994,8 +994,8 @@ TRANS(TLIAccept)(XtransConnInfo ciptr, int *status)
PRMSG(1, "TLIAccept() ioctl(I_PUSH,\"tirdwr\") failed %d\n",
errno,0,0 );
t_close(newciptr->fd);
- xfree(newciptr->addr);
- xfree(newciptr);
+ free(newciptr->addr);
+ free(newciptr);
*status = TRANS_ACCEPT_MISC_ERROR;
return NULL;
}
diff --git a/nx-X11/lib/xtrans/Xtransutil.c b/nx-X11/lib/xtrans/Xtransutil.c
index 20e431ac8..7dc91b16c 100644
--- a/nx-X11/lib/xtrans/Xtransutil.c
+++ b/nx-X11/lib/xtrans/Xtransutil.c
@@ -211,7 +211,7 @@ 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)
@@ -226,7 +226,7 @@ TRANS(ConvertAddress)(int *familyp, int *addrlenp, Xtransaddr **addrp)
else
{
if (*addrp)
- xfree ((char *) *addrp);
+ free ((char *) *addrp);
*addrp = NULL;
*addrlenp = 0;
}
diff --git a/nx-X11/lib/xtrans/transport.c b/nx-X11/lib/xtrans/transport.c
index ff460c257..49441d76e 100644
--- a/nx-X11/lib/xtrans/transport.c
+++ b/nx-X11/lib/xtrans/transport.c
@@ -62,7 +62,6 @@ from The Open Group.
#define xalloc(_size) malloc(_size)
#define xcalloc(_num,_size) calloc(_num,_size)
#define xrealloc(_ptr,_size) realloc(_ptr,_size)
-#define xfree(_ptr) free(_ptr)
#endif
#include "Xtransint.h"