aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/xtrans
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-27 11:51:31 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:05:31 +0200
commitce40aec08aef6aebd1d25728a1d0dc4b2bc8db09 (patch)
tree35762983db2c3e9f0b2fec6501b77ec2d55a7fa4 /nx-X11/lib/xtrans
parent74a5450bc058354e55c1589e64ef8e73775cebc4 (diff)
downloadnx-libs-ce40aec08aef6aebd1d25728a1d0dc4b2bc8db09.tar.gz
nx-libs-ce40aec08aef6aebd1d25728a1d0dc4b2bc8db09.tar.bz2
nx-libs-ce40aec08aef6aebd1d25728a1d0dc4b2bc8db09.zip
nx-X11/programs/Xserver: Drop {X,x}calloc() macros, use calloc() instead.
Diffstat (limited to 'nx-X11/lib/xtrans')
-rw-r--r--nx-X11/lib/xtrans/Xtransdnet.c12
-rw-r--r--nx-X11/lib/xtrans/Xtranslcl.c8
-rw-r--r--nx-X11/lib/xtrans/Xtransos2.c14
-rw-r--r--nx-X11/lib/xtrans/Xtranssock.c12
-rw-r--r--nx-X11/lib/xtrans/Xtranstli.c4
-rw-r--r--nx-X11/lib/xtrans/transport.c1
6 files changed, 25 insertions, 26 deletions
diff --git a/nx-X11/lib/xtrans/Xtransdnet.c b/nx-X11/lib/xtrans/Xtransdnet.c
index 161d48099..00a086277 100644
--- a/nx-X11/lib/xtrans/Xtransdnet.c
+++ b/nx-X11/lib/xtrans/Xtransdnet.c
@@ -187,7 +187,7 @@ TRANS(DNETOpenCOTSClient) (Xtransport *thistrans, char *protocol,
PRMSG (2,"DNETOpenCOTSClient(%s,%s,%s)\n", protocol, host, port);
- if ((ciptr = (XtransConnInfo) xcalloc (
+ if ((ciptr = (XtransConnInfo) calloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
PRMSG (1, "DNETOpenCOTSClient: malloc failed\n", 0, 0, 0);
@@ -215,7 +215,7 @@ TRANS(DNETOpenCOTSServer) (Xtransport *thistrans, char *protocol,
PRMSG (2,"DNETOpenCOTSServer(%s,%s,%s)\n", protocol, host, port);
- if ((ciptr = (XtransConnInfo) xcalloc (
+ if ((ciptr = (XtransConnInfo) calloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
PRMSG (1, "DNETOpenCOTSServer: malloc failed\n", 0, 0, 0);
@@ -247,7 +247,7 @@ TRANS(DNETOpenCLTSClient) (Xtransport *thistrans, char *protocol,
PRMSG (2,"DNETOpenCLTSClient(%s,%s,%s)\n", protocol, host, port);
- if ((ciptr = (XtransConnInfo) xcalloc (
+ if ((ciptr = (XtransConnInfo) calloc (
1, sizeof (struct _XtransConnInfo))) == NULL)
{
PRMSG (1, "DNETOpenCLTSClient: malloc failed\n", 0, 0, 0);
@@ -290,7 +290,7 @@ TRANS(DNETReopenCOTSServer) (Xtransport *thistrans, int fd, char *port)
PRMSG (2,"DNETReopenCOTSServer(%d,%s)\n", fd, port, 0);
- if ((ciptr = (XtransConnInfo) xcalloc (
+ if ((ciptr = (XtransConnInfo) calloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
PRMSG (1, "DNETReopenCOTSServer: malloc failed\n", 0, 0, 0);
@@ -311,7 +311,7 @@ TRANS(DNETReopenCLTSServer) (Xtransport *thistrans, int fd, char *port)
PRMSG (2,"DNETReopenCLTSServer(%d,%s)\n", fd, port, 0);
- if ((ciptr = (XtransConnInfo) xcalloc (
+ if ((ciptr = (XtransConnInfo) calloc (
1, sizeof(struct _XtransConnInfo))) == NULL)
{
PRMSG (1, "DNETReopenCLTSServer: malloc failed\n", 0, 0, 0);
@@ -393,7 +393,7 @@ TRANS(DNETAccept) (XtransConnInfo ciptr, int *status)
PRMSG (2, "DNETAccept(%x,%d)\n", ciptr, ciptr->fd, 0);
- if ((newciptr = (XtransConnInfo) xcalloc(
+ if ((newciptr = (XtransConnInfo) calloc(
1, sizeof (struct _XtransConnInfo))) == NULL)
{
PRMSG (1, "DNETAccept: malloc failed\n", 0, 0, 0);
diff --git a/nx-X11/lib/xtrans/Xtranslcl.c b/nx-X11/lib/xtrans/Xtranslcl.c
index ebc8518ee..52e845124 100644
--- a/nx-X11/lib/xtrans/Xtranslcl.c
+++ b/nx-X11/lib/xtrans/Xtranslcl.c
@@ -2038,7 +2038,7 @@ TRANS(LocalOpenClient)(int type, char *protocol, char *host, char *port)
*/
#endif /* X11_t */
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
PRMSG(1,"LocalOpenClient: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
@@ -2113,7 +2113,7 @@ TRANS(LocalOpenServer)(int type, char *protocol, char *host, char *port)
*/
#endif /* X11_t */
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
PRMSG(1,"LocalOpenServer: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
@@ -2168,7 +2168,7 @@ TRANS(LocalReopenServer)(int type, int index, int fd, char *port)
PRMSG(2,"LocalReopenServer(%d,%d,%d)\n", type, index, fd);
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
PRMSG(1,"LocalReopenServer: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
@@ -2384,7 +2384,7 @@ TRANS(LocalAccept)(XtransConnInfo ciptr, int *status)
transptr=(LOCALtrans2dev *)ciptr->priv;
- if( (newciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo)))==NULL )
+ if( (newciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo)))==NULL )
{
PRMSG(1,"LocalAccept: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
diff --git a/nx-X11/lib/xtrans/Xtransos2.c b/nx-X11/lib/xtrans/Xtransos2.c
index 9fd5049a0..1380403da 100644
--- a/nx-X11/lib/xtrans/Xtransos2.c
+++ b/nx-X11/lib/xtrans/Xtransos2.c
@@ -90,7 +90,7 @@ TRANS(Os2OpenClient)(Xtransport *thistrans, char *protocol,
PRMSG(5, "Os2OpenClient: Creating pipe %s\n",pipename, 0,0 );
/* make a connection entry */
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL ) {
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL ) {
PRMSG(1,"Os2OpenClient: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
return NULL;
@@ -268,9 +268,9 @@ TRANS(Os2OpenServer)(Xtransport *thistrans, char *protocol,
PRMSG(2,"Os2OpenServer(%s,%s,%s)\n",protocol,host,port);
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
- PRMSG(1,"Os2OpenServer: xcalloc(1,%d) failed\n",
+ PRMSG(1,"Os2OpenServer: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
return NULL;
}
@@ -432,9 +432,9 @@ TRANS(Os2ReopenCOTSServer)(Xtransport *thistrans, int fd, char *port)
PRMSG(2,"Os2ReopenCOTSServer(%d,%s)\n", fd, port, 0);
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
- PRMSG(1,"Os2ReopenCOTSServer: xcalloc(1,%d) failed\n",
+ PRMSG(1,"Os2ReopenCOTSServer: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
return NULL;
}
@@ -508,9 +508,9 @@ TRANS(Os2Accept)(XtransConnInfo ciptr, int *status)
PRMSG(2,"Os2Accept(%x->%d)\n", ciptr, ciptr->fd,0);
- if( (newciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo)))==NULL )
+ if( (newciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo)))==NULL )
{
- PRMSG(1,"Os2Accept: xcalloc(1,%d) failed\n",
+ PRMSG(1,"Os2Accept: calloc(1,%d) failed\n",
sizeof(struct _XtransConnInfo),0,0 );
*status = TRANS_ACCEPT_BAD_MALLOC;
return NULL;
diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c
index 79b95efdc..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;
@@ -653,7 +653,7 @@ 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)
{
@@ -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);
@@ -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);
@@ -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);
@@ -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);
diff --git a/nx-X11/lib/xtrans/Xtranstli.c b/nx-X11/lib/xtrans/Xtranstli.c
index 521f6a48c..cab8da79f 100644
--- a/nx-X11/lib/xtrans/Xtranstli.c
+++ b/nx-X11/lib/xtrans/Xtranstli.c
@@ -320,7 +320,7 @@ TRANS(TLIOpen)(char *device)
PRMSG(3,"TLIOpen(%s)\n", device, 0,0 );
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
PRMSG(1, "TLIOpen: calloc failed\n", 0,0,0 );
return NULL;
@@ -353,7 +353,7 @@ TRANS(TLIReopen)(char *device, int fd, char *port)
return NULL;
}
- if( (ciptr=(XtransConnInfo)xcalloc(1,sizeof(struct _XtransConnInfo))) == NULL )
+ if( (ciptr=(XtransConnInfo)calloc(1,sizeof(struct _XtransConnInfo))) == NULL )
{
PRMSG(1, "TLIReopen: calloc failed\n", 0,0,0 );
return NULL;
diff --git a/nx-X11/lib/xtrans/transport.c b/nx-X11/lib/xtrans/transport.c
index b7b1ef496..36de15e34 100644
--- a/nx-X11/lib/xtrans/transport.c
+++ b/nx-X11/lib/xtrans/transport.c
@@ -59,7 +59,6 @@ from The Open Group.
#include "os.h"
#else
#include <stdlib.h>
-#define xcalloc(_num,_size) calloc(_num,_size)
#endif
#include "Xtransint.h"