diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-26 01:51:18 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 14:05:30 +0200 |
commit | 2646fc254e75c4a7fc10d03d1139d0bd708ceae9 (patch) | |
tree | 6a183ec2959f55cf8d6850d072b557399b401f7e /nx-X11/programs/Xserver/Xext | |
parent | acf87144d019f18e646501657d9082c6eba77f54 (diff) | |
download | nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.tar.gz nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.tar.bz2 nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.zip |
nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.
Diffstat (limited to 'nx-X11/programs/Xserver/Xext')
-rw-r--r-- | nx-X11/programs/Xserver/Xext/extmod/modinit.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/panoramiX.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/saver.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/security.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shape.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/shm.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/sleepuntil.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/sync.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xcmisc.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xf86bigfont.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xvdisp.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xvmain.c | 8 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xext/xvmc.c | 8 |
14 files changed, 42 insertions, 42 deletions
diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.c b/nx-X11/programs/Xserver/Xext/extmod/modinit.c index 5bfd15719..5224a8ad9 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.c +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.c @@ -161,7 +161,7 @@ extmodSetup(void * module, void * opts, int *errmaj, int *errmin) for (i = 0; extensionModules[i].name != NULL; i++) { if (opts) { char *s; - s = (char *)xalloc(strlen(extensionModules[i].name) + 5); + s = (char *)malloc(strlen(extensionModules[i].name) + 5); if (s) { void * o; strcpy(s, "omit"); diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index c3b47cf2c..ecf3453bb 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -420,7 +420,7 @@ XineramaRegisterConnectionBlockCallback(void (*func)(void)) { XineramaConnectionCallbackList *newlist; - if(!(newlist = xalloc(sizeof(XineramaConnectionCallbackList)))) + if(!(newlist = malloc(sizeof(XineramaConnectionCallbackList)))) return FALSE; newlist->next = ConnectionCallbackList; @@ -539,7 +539,7 @@ void PanoramiXExtensionInit(int argc, char *argv[]) return; } - pScreenPriv = xalloc(sizeof(PanoramiXScreenRec)); + pScreenPriv = malloc(sizeof(PanoramiXScreenRec)); pScreen->devPrivates[PanoramiXScreenIndex].ptr = (void *)pScreenPriv; if(!pScreenPriv) { @@ -805,7 +805,7 @@ void PanoramiXConsolidate(void) PanoramiXDepths[PanoramiXNumDepths].numVids = 0; if(pDepth->numVids) PanoramiXDepths[PanoramiXNumDepths].vids = - xalloc(sizeof(VisualID) * pDepth->numVids); + malloc(sizeof(VisualID) * pDepth->numVids); else PanoramiXDepths[PanoramiXNumDepths].vids = NULL; PanoramiXNumDepths++; @@ -887,11 +887,11 @@ void PanoramiXConsolidate(void) } - root = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + root = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)); root->type = XRT_WINDOW; - defmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + defmap = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)); defmap->type = XRT_COLORMAP; - saver = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + saver = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)); saver->type = XRT_WINDOW; diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 28c0eb8b0..9682f2427 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -130,7 +130,7 @@ int PanoramiXCreateWindow(ClientPtr client) } } - if(!(newWin = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newWin = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newWin->type = XRT_WINDOW; @@ -660,7 +660,7 @@ int PanoramiXCreatePixmap(ClientPtr client) client, stuff->drawable, XRC_DRAWABLE, SecurityReadAccess))) return BadDrawable; - if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; @@ -760,7 +760,7 @@ int PanoramiXCreateGC(ClientPtr client) } } - if(!(newGC = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newGC = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newGC->type = XRT_GC; @@ -1844,7 +1844,7 @@ int PanoramiXGetImage(ClientPtr client) linesPerBuf = h; } length = linesPerBuf * widthBytesLine; - if(!(pBuf = xalloc(length))) + if(!(pBuf = malloc(length))) return (BadAlloc); WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); @@ -2072,7 +2072,7 @@ int PanoramiXCreateColormap(ClientPtr client) if(!stuff->visual || (stuff->visual > 255)) return BadValue; - if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newCmap = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; @@ -2141,7 +2141,7 @@ PanoramiXCopyColormapAndFree(ClientPtr client) SecurityReadAccess | SecurityWriteAccess))) return BadColor; - if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newCmap = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 68dbe2fe8..f9a86899f 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -218,7 +218,7 @@ static int ScreenPrivateIndex; #define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (void *) v); #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) -#define New(t) ((t *) xalloc (sizeof (t))) +#define New(t) ((t *) malloc (sizeof (t))) /**************** * ScreenSaverExtensionInit @@ -939,7 +939,7 @@ ScreenSaverSetAttributes (ClientPtr client) goto bail; } /* over allocate for override redirect */ - values = (unsigned long *) xalloc ((len + 1) * sizeof (unsigned long)); + values = (unsigned long *) malloc ((len + 1) * sizeof (unsigned long)); if (!values) { ret = BadAlloc; diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index ceadd8f6a..ec5f371db 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -524,7 +524,7 @@ SecurityEventSelectForAuthorization( } } - pEventClient = (OtherClients *) xalloc(sizeof(OtherClients)); + pEventClient = (OtherClients *) malloc(sizeof(OtherClients)); if (!pEventClient) return BadAlloc; pEventClient->mask = mask; @@ -662,7 +662,7 @@ ProcSecurityGenerateAuthorization( /* associate additional information with this auth ID */ - pAuth = (SecurityAuthorizationPtr)xalloc(sizeof(SecurityAuthorizationRec)); + pAuth = (SecurityAuthorizationPtr)malloc(sizeof(SecurityAuthorizationRec)); if (!pAuth) { err = BadAlloc; @@ -1643,7 +1643,7 @@ SecurityParsePropertyAccessRule( */ if (mustHaveValue) size += strlen(mustHaveValue) + 1; - pacl = (PropertyAccessPtr)Xalloc(size); + pacl = (PropertyAccessPtr)malloc(size); if (!pacl) return FALSE; @@ -1716,7 +1716,7 @@ SecurityParseSitePolicy( if (!policyStr) return FALSE; - copyPolicyStr = (char *)Xalloc(strlen(policyStr) + 1); + copyPolicyStr = (char *)malloc(strlen(policyStr) + 1); if (!copyPolicyStr) return TRUE; strcpy(copyPolicyStr, policyStr); diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index a55dd4553..b929dded0 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -849,7 +849,7 @@ ProcShapeSelectInput (client) /* build the entry */ pNewShapeEvent = (ShapeEventPtr) - xalloc (sizeof (ShapeEventRec)); + malloc (sizeof (ShapeEventRec)); if (!pNewShapeEvent) return BadAlloc; pNewShapeEvent->next = 0; @@ -871,7 +871,7 @@ ProcShapeSelectInput (client) */ if (!pHead) { - pHead = (ShapeEventPtr *) xalloc (sizeof (ShapeEventPtr)); + pHead = (ShapeEventPtr *) malloc (sizeof (ShapeEventPtr)); if (!pHead || !AddResource (pWin->drawable.id, EventType, (void *)pHead)) { diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index 4e36a6bb4..af529e46f 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -439,7 +439,7 @@ ProcShmAttach(client) } else { - shmdesc = (ShmDescPtr) xalloc(sizeof(ShmDescRec)); + shmdesc = (ShmDescPtr) malloc(sizeof(ShmDescRec)); if (!shmdesc) return BadAlloc; shmdesc->addr = shmat(stuff->shmid, 0, @@ -779,7 +779,7 @@ CreatePmap: VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); - if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; diff --git a/nx-X11/programs/Xserver/Xext/sleepuntil.c b/nx-X11/programs/Xserver/Xext/sleepuntil.c index 368dc6b48..93d75a862 100644 --- a/nx-X11/programs/Xserver/Xext/sleepuntil.c +++ b/nx-X11/programs/Xserver/Xext/sleepuntil.c @@ -98,7 +98,7 @@ ClientSleepUntil (client, revive, notifyFunc, closure) SertafiedGeneration = serverGeneration; BlockHandlerRegistered = FALSE; } - pRequest = (SertafiedPtr) xalloc (sizeof (SertafiedRec)); + pRequest = (SertafiedPtr) malloc (sizeof (SertafiedRec)); if (!pRequest) return FALSE; pRequest->pClient = client; diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index 8fe510497..88170169e 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -345,7 +345,7 @@ SyncAddTriggerToCounter(pTrigger) return Success; } - if (!(pCur = (SyncTriggerList *)xalloc(sizeof(SyncTriggerList)))) + if (!(pCur = (SyncTriggerList *)malloc(sizeof(SyncTriggerList)))) return BadAlloc; pCur->pTrigger = pTrigger; @@ -879,7 +879,7 @@ SyncEventSelectForAlarm(pAlarm, client, wantevents) /* add new client to pAlarm->pEventClients */ - pClients = (SyncAlarmClientList *) xalloc(sizeof(SyncAlarmClientList)); + pClients = (SyncAlarmClientList *) malloc(sizeof(SyncAlarmClientList)); if (!pClients) return BadAlloc; @@ -1014,7 +1014,7 @@ SyncCreateCounter(client, id, initialvalue) { SyncCounter *pCounter; - if (!(pCounter = (SyncCounter *) xalloc(sizeof(SyncCounter)))) + if (!(pCounter = (SyncCounter *) malloc(sizeof(SyncCounter)))) return (SyncCounter *)NULL; if (!AddResource(id, RTCounter, (void *) pCounter)) @@ -1081,7 +1081,7 @@ SyncCreateSystemCounter(name, initial, resolution, counterType, { SysCounterInfo *psci; - psci = (SysCounterInfo *)xalloc(sizeof(SysCounterInfo)); + psci = (SysCounterInfo *)malloc(sizeof(SysCounterInfo)); if (!psci) { FreeResource(pCounter->id, RT_NONE); @@ -1670,7 +1670,7 @@ ProcSyncAwait(client) /* all the memory for the entire await list is allocated * here in one chunk */ - pAwaitUnion = (SyncAwaitUnion *)xalloc((items+1) * sizeof(SyncAwaitUnion)); + pAwaitUnion = (SyncAwaitUnion *)malloc((items+1) * sizeof(SyncAwaitUnion)); if (!pAwaitUnion) return BadAlloc; @@ -1821,7 +1821,7 @@ ProcSyncCreateAlarm(client) if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue|XSyncCADelta)))) return BadLength; - if (!(pAlarm = (SyncAlarm *) xalloc(sizeof(SyncAlarm)))) + if (!(pAlarm = (SyncAlarm *) malloc(sizeof(SyncAlarm)))) { return BadAlloc; } diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c index 8f381cee5..7021ed47e 100644 --- a/nx-X11/programs/Xserver/Xext/xcmisc.c +++ b/nx-X11/programs/Xserver/Xext/xcmisc.c @@ -154,7 +154,7 @@ ProcXCMiscGetXIDList(client) if (stuff->count > UINT32_MAX / sizeof(XID)) return BadAlloc; - pids = (XID *)Xalloc(stuff->count * sizeof(XID)); + pids = (XID *)malloc(stuff->count * sizeof(XID)); if (!pids) { return BadAlloc; diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index 7bdda72b4..a89005cde 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -248,7 +248,7 @@ shmalloc( if (size < 3500) return (ShmDescPtr) NULL; - pDesc = (ShmDescRec *) xalloc(sizeof(ShmDescRec)); + pDesc = (ShmDescRec *) malloc(sizeof(ShmDescRec)); if (!pDesc) return (ShmDescPtr) NULL; diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index b300a32d5..e9250427d 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -1258,7 +1258,7 @@ ProcXvQueryImageAttributes(ClientPtr client) num_planes = pImage->num_planes; - if(!(offsets = xalloc(num_planes << 3))) + if(!(offsets = malloc(num_planes << 3))) return BadAlloc; pitches = offsets + num_planes; @@ -2223,7 +2223,7 @@ void XineramifyXv(void) /* now create a resource for each port */ for(j = 0; j < refAdapt->nPorts; j++) { - if(!(port = xalloc(sizeof(PanoramiXRes)))) + if(!(port = malloc(sizeof(PanoramiXRes)))) break; port->info[0].id = MatchingAdaptors[0]->base_id + j; AddResource(port->info[0].id, XvXRTPort, port); diff --git a/nx-X11/programs/Xserver/Xext/xvmain.c b/nx-X11/programs/Xserver/Xext/xvmain.c index d2c21b13f..8a279ac1e 100644 --- a/nx-X11/programs/Xserver/Xext/xvmain.c +++ b/nx-X11/programs/Xserver/Xext/xvmain.c @@ -288,7 +288,7 @@ XvScreenInit(ScreenPtr pScreen) /* ALLOCATE SCREEN PRIVATE RECORD */ - pxvs = (XvScreenPtr) xalloc (sizeof (XvScreenRec)); + pxvs = (XvScreenPtr) malloc (sizeof (XvScreenRec)); if (!pxvs) { ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); @@ -941,7 +941,7 @@ XvdiSelectVideoNotify( if (!pn) { - if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec)))) + if (!(tpn = (XvVideoNotifyPtr)malloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = (XvVideoNotifyPtr)NULL; if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) @@ -979,7 +979,7 @@ XvdiSelectVideoNotify( } else { - if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec)))) + if (!(tpn = (XvVideoNotifyPtr)malloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = pn->next; pn->next = tpn; @@ -1037,7 +1037,7 @@ XvdiSelectPortNotify( if (!tpn) { - if (!(tpn = (XvPortNotifyPtr)xalloc(sizeof(XvPortNotifyRec)))) + if (!(tpn = (XvPortNotifyPtr)malloc(sizeof(XvPortNotifyRec)))) return BadAlloc; tpn->next = pPort->pNotify; pPort->pNotify = tpn; diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c index 0ec04f3e3..bce7fbf7a 100644 --- a/nx-X11/programs/Xserver/Xext/xvmc.c +++ b/nx-X11/programs/Xserver/Xext/xvmc.c @@ -242,7 +242,7 @@ ProcXvMCCreateContext(ClientPtr client) (stuff->height > surface->max_height)) return BadValue; - if(!(pContext = xalloc(sizeof(XvMCContextRec)))) { + if(!(pContext = malloc(sizeof(XvMCContextRec)))) { return BadAlloc; } @@ -313,7 +313,7 @@ ProcXvMCCreateSurface(ClientPtr client) pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); - if(!(pSurface = xalloc(sizeof(XvMCSurfaceRec)))) + if(!(pSurface = malloc(sizeof(XvMCSurfaceRec)))) return BadAlloc; pSurface->surface_id = stuff->surface_id; @@ -408,7 +408,7 @@ ProcXvMCCreateSubpicture(ClientPtr client) (stuff->height > surface->subpicture_max_height)) return BadValue; - if(!(pSubpicture = xalloc(sizeof(XvMCSubpictureRec)))) + if(!(pSubpicture = malloc(sizeof(XvMCSubpictureRec)))) return BadAlloc; pSubpicture->subpicture_id = stuff->subpicture_id; @@ -726,7 +726,7 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) XvMCGeneration = serverGeneration; } - if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec)))) + if(!(pScreenPriv = (XvMCScreenPtr)malloc(sizeof(XvMCScreenRec)))) return BadAlloc; pScreen->devPrivates[XvMCScreenIndex].ptr = (void *)pScreenPriv; |