diff options
Diffstat (limited to 'nx-X11/lib/xtrans/Xtranssock.c')
-rw-r--r-- | nx-X11/lib/xtrans/Xtranssock.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c index 5c57fc5ba..e27ba9993 100644 --- a/nx-X11/lib/xtrans/Xtranssock.c +++ b/nx-X11/lib/xtrans/Xtranssock.c @@ -601,7 +601,7 @@ static XtransConnInfo TRANS(SocketCreateConnInfo) () fprintf(stderr, "SocketCreateConnInfo: Going to create the NX connection info.\n"); #endif - if ((ciptr = (XtransConnInfo) xcalloc (1, sizeof(struct _XtransConnInfo))) == NULL) + if ((ciptr = (XtransConnInfo) calloc (1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "SocketCreateConnInfo: malloc failed\n", 0, 0, 0); return NULL; @@ -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) @@ -653,12 +653,12 @@ static XtransConnInfo TRANS(SocketCreateConnInfo) () exit(1); } - _NXProxyConnInfoTab[ciptr->fd] = (_NXProxyConnInfo *) xcalloc(1, sizeof(_NXProxyConnInfo)); + _NXProxyConnInfoTab[ciptr->fd] = (_NXProxyConnInfo *) calloc(1, sizeof(_NXProxyConnInfo)); 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; @@ -957,7 +957,7 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr) * Everything looks good: fill in the XtransConnInfo structure. */ - if ((ciptr->addr = (char *) xalloc (namelen)) == NULL) + if ((ciptr->addr = (char *) malloc (namelen)) == NULL) { PRMSG (1, "SocketINETGetAddr: Can't allocate space for the addr\n", @@ -1032,7 +1032,7 @@ TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr) * Everything looks good: fill in the XtransConnInfo structure. */ - if ((ciptr->peeraddr = (char *) xalloc (namelen)) == NULL) + if ((ciptr->peeraddr = (char *) malloc (namelen)) == NULL) { PRMSG (1, "SocketINETGetPeerAddr: Can't allocate space for the addr\n", @@ -1063,7 +1063,7 @@ TRANS(SocketOpen) (int i, int type) return NULL; #endif - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "SocketOpen: malloc failed\n", 0, 0, 0); @@ -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; } @@ -1119,7 +1119,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port) PRMSG (3,"SocketReopen(%d,%d,%s)\n", type, fd, port); - if ((ciptr = (XtransConnInfo) xcalloc ( + if ((ciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "SocketReopen: malloc failed\n", 0, 0, 0); @@ -1834,7 +1834,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port, namelen = sizeof (sockname); /* this will always make it the same size */ - if ((ciptr->addr = (char *) xalloc (namelen)) == NULL) + if ((ciptr->addr = (char *) malloc (namelen)) == NULL) { PRMSG (1, "SocketUNIXCreateListener: Can't allocate space for the addr\n", @@ -1953,7 +1953,7 @@ TRANS(SocketINETAccept) (XtransConnInfo ciptr, int *status) PRMSG (2, "SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd, 0); - if ((newciptr = (XtransConnInfo) xcalloc ( + if ((newciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "SocketINETAccept: malloc failed\n", 0, 0, 0); @@ -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; } @@ -2036,7 +2036,7 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) PRMSG (2, "SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd, 0); - if ((newciptr = (XtransConnInfo) xcalloc ( + if ((newciptr = (XtransConnInfo) calloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) { PRMSG (1, "SocketUNIXAccept: malloc() failed\n", 0, 0, 0); @@ -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; } @@ -2058,13 +2058,13 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) * since this is unix domain. */ - if ((newciptr->addr = (char *) xalloc (ciptr->addrlen)) == NULL) + if ((newciptr->addr = (char *) malloc (ciptr->addrlen)) == NULL) { PRMSG (1, "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; } @@ -2078,14 +2078,14 @@ TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) newciptr->addrlen = ciptr->addrlen; memcpy (newciptr->addr, ciptr->addr, newciptr->addrlen); - if ((newciptr->peeraddr = (char *) xalloc (ciptr->addrlen)) == NULL) + if ((newciptr->peeraddr = (char *) malloc (ciptr->addrlen)) == NULL) { PRMSG (1, "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 { @@ -2827,8 +2827,8 @@ SocketUNIXConnectPost: * since this is unix domain. */ - if ((ciptr->addr = (char *) xalloc(namelen)) == NULL || - (ciptr->peeraddr = (char *) xalloc(namelen)) == NULL) + if ((ciptr->addr = (char *) malloc(namelen)) == NULL || + (ciptr->peeraddr = (char *) malloc(namelen)) == NULL) { PRMSG (1, "SocketUNIXCreateListener: Can't allocate space for the addr\n", |