aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
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
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')
-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
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiX.c8
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiXprocs.c2
-rw-r--r--nx-X11/programs/Xserver/Xi/listdev.c2
-rw-r--r--nx-X11/programs/Xserver/dbe/dbe.c2
-rw-r--r--nx-X11/programs/Xserver/dix/colormap.c2
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c2
-rw-r--r--nx-X11/programs/Xserver/dix/main.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbpseudocolor.c2
-rw-r--r--nx-X11/programs/Xserver/mi/mibank.c4
-rw-r--r--nx-X11/programs/Xserver/mi/mioverlay.c2
-rw-r--r--nx-X11/programs/Xserver/randr/randr.c2
-rw-r--r--nx-X11/programs/Xserver/randr/rrcrtc.c6
-rw-r--r--nx-X11/programs/Xserver/randr/rrmonitor.c10
-rw-r--r--nx-X11/programs/Xserver/randr/rrprovider.c2
-rw-r--r--nx-X11/programs/Xserver/record/set.c10
21 files changed, 51 insertions, 60 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"
diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c
index 3c72cec22..c00d003a5 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiX.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiX.c
@@ -525,7 +525,7 @@ void PanoramiXExtensionInit(int argc, char *argv[])
*/
panoramiXdataPtr = (PanoramiXData *)
- xcalloc(PanoramiXNumScreens, sizeof(PanoramiXData));
+ calloc(PanoramiXNumScreens, sizeof(PanoramiXData));
BREAK_IF(!panoramiXdataPtr);
BREAK_IF((PanoramiXGCIndex = AllocateGCPrivateIndex()) < 0);
@@ -769,16 +769,16 @@ void PanoramiXConsolidate(void)
Bool foundDepth, missingDepth;
if(!PanoramiXVisualTable)
- PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID));
+ PanoramiXVisualTable = calloc(256 * MAXSCREENS, sizeof(XID));
pScreen = screenInfo.screens[0];
pVisual = pScreen->visuals;
pDepth = pScreen->allowedDepths;
PanoramiXNumDepths = 0;
- PanoramiXDepths = xcalloc(pScreen->numDepths,sizeof(DepthRec));
+ PanoramiXDepths = calloc(pScreen->numDepths,sizeof(DepthRec));
PanoramiXNumVisuals = 0;
- PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec));
+ PanoramiXVisuals = calloc(pScreen->numVisuals,sizeof(VisualRec));
for (i = 0; i < pScreen->numDepths; i++, pDepth++) {
missingDepth = FALSE;
diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
index 9682f2427..36ebfac21 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
@@ -1036,7 +1036,7 @@ int PanoramiXCopyArea(ClientPtr client)
VERIFY_DRAWABLE(drawables[j], src->info[j].id, client);
pitch = PixmapBytePad(stuff->width, drawables[0]->depth);
- if(!(data = xcalloc(1, stuff->height * pitch)))
+ if(!(data = calloc(1, stuff->height * pitch)))
return BadAlloc;
XineramaGetImageData(drawables, srcx, srcy,
diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c
index 2e78aa339..7f3b49e89 100644
--- a/nx-X11/programs/Xserver/Xi/listdev.c
+++ b/nx-X11/programs/Xserver/Xi/listdev.c
@@ -129,7 +129,7 @@ ProcXListInputDevices (client)
SizeDeviceInfo (d, &namesize, &size);
total_length = numdevs * sizeof (xDeviceInfo) + size + namesize;
- devbuf = (char *) xcalloc (1, total_length);
+ devbuf = (char *) calloc (1, total_length);
classbuf = devbuf + (numdevs * sizeof (xDeviceInfo));
namebuf = classbuf + size;
savbuf = devbuf;
diff --git a/nx-X11/programs/Xserver/dbe/dbe.c b/nx-X11/programs/Xserver/dbe/dbe.c
index 743099763..5687f3d56 100644
--- a/nx-X11/programs/Xserver/dbe/dbe.c
+++ b/nx-X11/programs/Xserver/dbe/dbe.c
@@ -1874,7 +1874,7 @@ DbeExtensionInit()
if (!AllocateWindowPrivate(pScreen, dbeWindowPrivIndex, 0) ||
!(pDbeScreenPriv =
- (DbeScreenPrivPtr)Xcalloc(sizeof(DbeScreenPrivRec))))
+ (DbeScreenPrivPtr)calloc(1, sizeof(DbeScreenPrivRec))))
{
/* If we can not alloc a window or screen private,
* then free any privates that we already alloc'ed and return
diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c
index 8129e9c3d..44095b729 100644
--- a/nx-X11/programs/Xserver/dix/colormap.c
+++ b/nx-X11/programs/Xserver/dix/colormap.c
@@ -395,7 +395,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
pmap->devPrivates = NULL;
else
{
- pmap->devPrivates = (DevUnion *) xcalloc (
+ pmap->devPrivates = (DevUnion *) calloc (
sizeof(DevUnion), colormapPrivateCount);
if (!pmap->devPrivates)
{
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index ed908d03f..aac3284a7 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -2188,7 +2188,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
xgi.length = length;
if (im_return) {
- pBuf = (char *)xcalloc(1, sz_xGetImageReply + length);
+ pBuf = (char *)calloc(1, sz_xGetImageReply + length);
if (!pBuf)
return (BadAlloc);
if (widthBytesLine == 0)
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index a95b8b4a9..de53a6593 100644
--- a/nx-X11/programs/Xserver/dix/main.c
+++ b/nx-X11/programs/Xserver/dix/main.c
@@ -689,11 +689,11 @@ AddScreen(
if (i == MAXSCREENS)
return -1;
- pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec));
+ pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec));
if (!pScreen)
return -1;
- pScreen->devPrivates = (DevUnion *)xcalloc(sizeof(DevUnion),
+ pScreen->devPrivates = (DevUnion *)calloc(sizeof(DevUnion),
screenPrivateCount);
if (!pScreen->devPrivates && screenPrivateCount)
{
diff --git a/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
index 71f39b52f..c22309a93 100644
--- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c
+++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
@@ -1150,7 +1150,7 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy
pScrPriv->sync = sync;
pScreen->maxInstalledCmaps += MAX_NUM_XX_INSTALLED_CMAPS;
- pScrPriv->InstalledCmaps = xcalloc(MAX_NUM_XX_INSTALLED_CMAPS,
+ pScrPriv->InstalledCmaps = calloc(MAX_NUM_XX_INSTALLED_CMAPS,
sizeof(ColormapPtr));
if (!pScrPriv->InstalledCmaps)
return FALSE;
diff --git a/nx-X11/programs/Xserver/mi/mibank.c b/nx-X11/programs/Xserver/mi/mibank.c
index 754b0916f..a651c021e 100644
--- a/nx-X11/programs/Xserver/mi/mibank.c
+++ b/nx-X11/programs/Xserver/mi/mibank.c
@@ -2243,11 +2243,11 @@ miInitializeBanking(
(sizeof(miBankGCRec) - sizeof(RegionPtr))))
return FALSE;
- if (!(pScreenPriv = (miBankScreenPtr)Xcalloc(sizeof(miBankScreenRec))))
+ if (!(pScreenPriv = (miBankScreenPtr)calloc(1, sizeof(miBankScreenRec))))
return FALSE;
if (!(pScreenPriv->pBanks = /* Allocate and clear */
- (RegionPtr *)Xcalloc(nBanks * sizeof(RegionPtr))))
+ (RegionPtr *)calloc(1, nBanks * sizeof(RegionPtr))))
{
free(pScreenPriv);
return FALSE;
diff --git a/nx-X11/programs/Xserver/mi/mioverlay.c b/nx-X11/programs/Xserver/mi/mioverlay.c
index cff29ee2a..3a85863ed 100644
--- a/nx-X11/programs/Xserver/mi/mioverlay.c
+++ b/nx-X11/programs/Xserver/mi/mioverlay.c
@@ -196,7 +196,7 @@ miOverlayCreateWindow(WindowPtr pWin)
pWinPriv->tree = NULL;
if(!pWin->parent || !((*pScreenPriv->InOverlay)(pWin))) {
- if(!(pTree = (miOverlayTreePtr)xcalloc(1, sizeof(miOverlayTreeRec))))
+ if(!(pTree = (miOverlayTreePtr)calloc(1, sizeof(miOverlayTreeRec))))
return FALSE;
}
diff --git a/nx-X11/programs/Xserver/randr/randr.c b/nx-X11/programs/Xserver/randr/randr.c
index afce35d7d..8ff3f9c75 100644
--- a/nx-X11/programs/Xserver/randr/randr.c
+++ b/nx-X11/programs/Xserver/randr/randr.c
@@ -321,7 +321,7 @@ RRScreenInit(ScreenPtr pScreen)
if (!RRInit())
return FALSE;
- pScrPriv = (rrScrPrivPtr) xcalloc(1, sizeof(rrScrPrivRec));
+ pScrPriv = (rrScrPrivPtr) calloc(1, sizeof(rrScrPrivRec));
if (!pScrPriv)
return FALSE;
diff --git a/nx-X11/programs/Xserver/randr/rrcrtc.c b/nx-X11/programs/Xserver/randr/rrcrtc.c
index 95f02b8cd..4c9b805c2 100644
--- a/nx-X11/programs/Xserver/randr/rrcrtc.c
+++ b/nx-X11/programs/Xserver/randr/rrcrtc.c
@@ -95,7 +95,7 @@ RRCrtcCreate(ScreenPtr pScreen, void *devPrivate)
return FALSE;
pScrPriv->crtcs = crtcs;
- crtc = xcalloc(1, sizeof(RRCrtcRec));
+ crtc = calloc(1, sizeof(RRCrtcRec));
if (!crtc)
return NULL;
crtc->id = FakeClientID(0);
@@ -370,7 +370,7 @@ RRComputeContiguity(ScreenPtr pScreen)
Bool discontiguous = TRUE;
int i, n = pScrPriv->numCrtcs;
- int *reachable = xcalloc(n, sizeof(int));
+ int *reachable = calloc(n, sizeof(int));
if (!reachable)
goto out;
@@ -1673,7 +1673,7 @@ ProcRRGetCrtcTransform(ClientPtr client)
nextra = (transform_filter_length(pending) +
transform_filter_length(current));
- reply = xcalloc(1, sizeof(xRRGetCrtcTransformReply) + nextra);
+ reply = calloc(1, sizeof(xRRGetCrtcTransformReply) + nextra);
if (!reply)
return BadAlloc;
diff --git a/nx-X11/programs/Xserver/randr/rrmonitor.c b/nx-X11/programs/Xserver/randr/rrmonitor.c
index 651dd47f8..42e0de64a 100644
--- a/nx-X11/programs/Xserver/randr/rrmonitor.c
+++ b/nx-X11/programs/Xserver/randr/rrmonitor.c
@@ -95,7 +95,7 @@ RRMonitorSetFromServer(RRCrtcPtr crtc, RRMonitorPtr monitor)
monitor->name = RRMonitorCrtcName(crtc);
monitor->pScreen = crtc->pScreen;
monitor->numOutputs = crtc->numOutputs;
- monitor->outputs = xcalloc(crtc->numOutputs, sizeof(RRCrtc));
+ monitor->outputs = calloc(crtc->numOutputs, sizeof(RRCrtc));
if (!monitor->outputs)
return FALSE;
for (o = 0; o < crtc->numOutputs; o++)
@@ -173,7 +173,7 @@ RRMonitorSetFromClient(RRMonitorPtr client_monitor, RRMonitorPtr monitor)
monitor->name = client_monitor->name;
monitor->pScreen = client_monitor->pScreen;
monitor->numOutputs = client_monitor->numOutputs;
- monitor->outputs = xcalloc(client_monitor->numOutputs, sizeof(RROutput));
+ monitor->outputs = calloc(client_monitor->numOutputs, sizeof(RROutput));
if (!monitor->outputs && client_monitor->numOutputs)
return FALSE;
memcpy(monitor->outputs, client_monitor->outputs, client_monitor->numOutputs * sizeof(RROutput));
@@ -216,7 +216,7 @@ RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active)
#endif
mon_list->num_crtcs = numCrtcs;
- mon_list->server_crtc = xcalloc(numCrtcs * 2, sizeof(RRCrtcPtr));
+ mon_list->server_crtc = calloc(numCrtcs * 2, sizeof(RRCrtcPtr));
if (!mon_list->server_crtc)
return FALSE;
@@ -321,7 +321,7 @@ RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr * monitors_ret
if (!RRMonitorInitList(screen, &list, get_active))
return FALSE;
- monitors = xcalloc(list.num_client + list.num_server, sizeof(RRMonitorRec));
+ monitors = calloc(list.num_client + list.num_server, sizeof(RRMonitorRec));
if (!monitors) {
RRMonitorFiniList(&list);
return FALSE;
@@ -409,7 +409,7 @@ RRMonitorAlloc(int noutput)
{
RRMonitorPtr monitor;
- monitor = xcalloc(1, sizeof(RRMonitorRec) + noutput * sizeof(RROutput));
+ monitor = calloc(1, sizeof(RRMonitorRec) + noutput * sizeof(RROutput));
if (!monitor)
return NULL;
monitor->numOutputs = noutput;
diff --git a/nx-X11/programs/Xserver/randr/rrprovider.c b/nx-X11/programs/Xserver/randr/rrprovider.c
index 1c292b05e..7d3096482 100644
--- a/nx-X11/programs/Xserver/randr/rrprovider.c
+++ b/nx-X11/programs/Xserver/randr/rrprovider.c
@@ -380,7 +380,7 @@ RRProviderCreate(ScreenPtr pScreen, const char *name,
pScrPriv = rrGetScrPriv(pScreen);
- provider = xcalloc(1, sizeof(RRProviderRec) + nameLength + 1);
+ provider = calloc(1, sizeof(RRProviderRec) + nameLength + 1);
if (!provider)
return NULL;
diff --git a/nx-X11/programs/Xserver/record/set.c b/nx-X11/programs/Xserver/record/set.c
index b8e4cc44c..b7360a565 100644
--- a/nx-X11/programs/Xserver/record/set.c
+++ b/nx-X11/programs/Xserver/record/set.c
@@ -75,14 +75,6 @@ typedef unsigned short CARD16;
#define ALLOCATE_LOCAL malloc
#define DEALLOCATE_LOCAL free
-void *Xcalloc(size)
- int size;
-{
- void *p = malloc(size);
- if (p) memset(p, 0, size);
- return p;
-}
-
#ifndef max
#define max(_a, _b) ( ((_a) > (_b)) ? (_a) : (_b) )
#endif
@@ -258,7 +250,7 @@ BitVectorCreateSet(pIntervals, nIntervals, pMem, memsize)
}
else
{
- pbvs = (BitVectorSetPtr)Xcalloc(memsize);
+ pbvs = (BitVectorSetPtr)calloc(1, memsize);
if (!pbvs) return NULL;
pbvs->baseSet.ops = &BitVectorSetOperations;
}