Replace x allocator functions with direct libc calls
PATCH 1/1 Replace x allocator functions with direct libc calls
The server no longer supports the allocator wrapping functions.
Signed-off-by Keith Packard <[email protected]>
--- src/drmmode_display.c | 20 +++++++++--------- src/i810_dga.c | 4 +- src/i810_dri.c | 50 ++++++++++++++++++++++++------------------------ src/i810_driver.c | 12 +++++----- src/i810_hwmc.c | 10 ++++---- src/i810_video.c | 26 ++++++++++++------------ src/i830_batchbuffer.c | 2 +- src/i830_dri.c | 36 +++++++++++++++++----------------- src/i830_driver.c | 12 +++++----- src/i830_hwmc.c | 4 +- src/i830_uxa.c | 10 ++++---- src/i830_video.c | 22 ++++++++++---------- src/xvmc/I810XvMC.c | 2 +- src/xvmc/i965_xvmc.c | 2 +- src/xvmc/intel_xvmc.c | 2 +- src/xvmc/xvmc_vld.c | 2 +- uxa/uxa-accel.c | 14 ++++++------ uxa/uxa-glyphs.c | 8 +++--- uxa/uxa.c | 8 +++--- 19 files changed, 123 insertions(+), 123 deletions(-)
src/drmmode_display.c +10 -10
@@ -342,7 +342,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, crtc->y = y; crtc->rotation = rotation; - output_ids =xcalloc (sizeof (uint32_t ), xf86_config->num_output); + output_ids =calloc (sizeof (uint32_t ), xf86_config->num_output);if (!output_ids) { ret = FALSE; goto done;
@@ -812,18 +812,18 @@ drmmode_output_destroy(xf86OutputPtr output)drmModeFreePropertyBlob (drmmode_output->edid_blob);for (i =0 ; i < drmmode_output->num_props; i++) {drmModeFreeProperty (drmmode_output->props[i].mode_prop); -xfree (drmmode_output->props[i].atoms); +free (drmmode_output->props[i].atoms); } -xfree (drmmode_output->props); +free (drmmode_output->props);drmModeFreeConnector (drmmode_output->mode_output); drmmode_output->mode_output =NULL ;if (drmmode_output->private_data) { -xfree (drmmode_output->private_data); +free (drmmode_output->private_data); drmmode_output->private_data =NULL ; }if (drmmode_output->backlight_iface)drmmode_backlight_set (output, drmmode_output->backlight_active_level); -xfree (drmmode_output); +free (drmmode_output); output->driver_private =NULL ; }
@@ -914,7 +914,7 @@ drmmode_output_create_resources(xf86OutputPtr output)drmModePropertyPtr drmmode_prop;int i, j, err; - drmmode_output->props =xcalloc (mode_output->count_props,sizeof (drmmode_prop_rec)); + drmmode_output->props =calloc (mode_output->count_props,sizeof (drmmode_prop_rec));if (!drmmode_output->props)return ;
@@ -939,7 +939,7 @@ drmmode_output_create_resources(xf86OutputPtr output)INT32 range[2 ]; p->num_atoms =1 ; - p->atoms =xcalloc (p->num_atoms,sizeof (Atom)); + p->atoms =calloc (p->num_atoms,sizeof (Atom));if (!p->atoms)continue ; p->atoms[0 ] =MakeAtom (drmmode_prop->name,strlen (drmmode_prop->name), TRUE);
@@ -961,7 +961,7 @@ drmmode_output_create_resources(xf86OutputPtr output) } }else if (drmmode_prop->flags &DRM_MODE_PROP_ENUM ) { p->num_atoms = drmmode_prop->count_enums +1 ; - p->atoms =xcalloc (p->num_atoms,sizeof (Atom)); + p->atoms =calloc (p->num_atoms,sizeof (Atom));if (!p->atoms)continue ; p->atoms[0 ] =MakeAtom (drmmode_prop->name,strlen (drmmode_prop->name), TRUE);
@@ -1206,7 +1206,7 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)return ; } - drmmode_output =xcalloc (sizeof (drmmode_output_private_rec),1 ); + drmmode_output =calloc (sizeof (drmmode_output_private_rec),1 );if (!drmmode_output) {xf86OutputDestroy (output);drmModeFreeConnector (koutput);
@@ -1220,7 +1220,7 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)*/ drmmode_output->private_data =NULL ;if (koutput->connector_type ==DRM_MODE_CONNECTOR_LVDS ) { - drmmode_output->private_data =xcalloc ( + drmmode_output->private_data =calloc (sizeof (struct fixed_panel_lvds ),1 );if (!drmmode_output->private_data) xf86DrvMsg(scrn->scrnIndex, X_ERROR,
src/i810_dga.c +2 -2
@@ -84,10 +84,10 @@ I810DGAInit(ScreenPtr pScreen)while (pMode) { - newmodes =xrealloc (modes, (num +1 ) *sizeof (DGAModeRec)); + newmodes =realloc (modes, (num +1 ) *sizeof (DGAModeRec));if (!newmodes) { -xfree (modes); +free (modes);return FALSE; } modes = newmodes;
src/i810_dri.c +25 -25
127 lines not on this page · raw message
src/i810_driver.c +6 -6
@@ -366,7 +366,7 @@ I810FreeRec(ScrnInfoPtr pScrn)return ;if (!pScrn->driverPrivate)return ; -xfree (pScrn->driverPrivate); +free (pScrn->driverPrivate); pScrn->driverPrivate = NULL; }#endif
@@ -617,7 +617,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)/* Process the options */ xf86CollectOptions (pScrn,NULL ); -if (!(pI810->Options =xalloc (sizeof (I810Options)))) +if (!(pI810->Options =malloc (sizeof (I810Options))))return FALSE;memcpy (pI810->Options, I810Options,sizeof (I810Options));xf86ProcessOptions (pScrn->scrnIndex, pScrn->options, pI810->Options);
@@ -1897,7 +1897,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI810 =I810PTR (pScrn); hwp =VGAHWPTR (pScrn); - pI810->LpRing =xcalloc (sizeof (I810RingBuffer),1 ); + pI810->LpRing =calloc (sizeof (I810RingBuffer),1 );if (!pI810->LpRing) {xf86DrvMsg (pScrn->scrnIndex,X_ERROR ,"Could not allocate lpring data structure.\n" );
@@ -2306,13 +2306,13 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)vgaHWUnmapMem (pScrn);if (pI810->ScanlineColorExpandBuffers) { -xfree (pI810->ScanlineColorExpandBuffers); +free (pI810->ScanlineColorExpandBuffers); pI810->ScanlineColorExpandBuffers =NULL ; }if (infoPtr) {if (infoPtr->ScanlineColorExpandBuffers) -xfree (infoPtr->ScanlineColorExpandBuffers); +free (infoPtr->ScanlineColorExpandBuffers);XAADestroyInfoRec (infoPtr); pI810->AccelInfoRec =NULL ; }
@@ -2333,7 +2333,7 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)*/ xf86GARTCloseScreen (scrnIndex); -xfree (pI810->LpRing); +free (pI810->LpRing); pI810->LpRing =NULL ; pScrn->vtSema = FALSE;
src/i810_hwmc.c +5 -5
@@ -230,7 +230,7 @@ void I810InitMC(ScreenPtr pScreen)* Set *num_priv to the number of 32bit words that make up the size of * of the data that priv will point to. * -* *priv = (long *) xcalloc (elements, sizeof(element)) +* *priv = (long *) calloc(elements, sizeof(element)) * *num_priv = (elements * sizeof(element)) >> 2; * **************************************************************************/
@@ -256,7 +256,7 @@ int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext,return BadAlloc; } - *priv =xcalloc (1 ,sizeof (I810XvMCCreateContextRec)); + *priv =calloc (1 ,sizeof (I810XvMCCreateContextRec)); contextRec = (I810XvMCCreateContextRec *)*priv;if (!*priv) {
@@ -268,7 +268,7 @@ int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext,if (drmCreateContext (pI810->drmSubFD, &(contextRec->drmcontext) ) <0 ) {xf86DrvMsg (pScrn->scrnIndex,X_ERROR ,"I810XvMCCreateContext: Unable to create DRMContext!\n" ); -xfree (*priv); +free (*priv);return BadAlloc; }
@@ -295,7 +295,7 @@ int I810XvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf,I810Ptr pI810 =I810PTR (pScrn);int i; - *priv = (long *)xcalloc (2 ,sizeof (long )); + *priv = (long *)calloc (2 ,sizeof (long ));if (!*priv) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -341,7 +341,7 @@ int I810XvMCCreateSubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp,I810Ptr pI810 =I810PTR (pScrn);int i; - *priv = (long *)xcalloc (1 ,sizeof (long )); + *priv = (long *)calloc (1 ,sizeof (long ));if (!*priv) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
src/i810_video.c +13 -13
@@ -174,7 +174,7 @@ void I810InitVideo(ScreenPtr pScreen) adaptors = &newAdaptor; }else { newAdaptors =/* need to free this someplace */ -xalloc ((num_adaptors +1 ) *sizeof (XF86VideoAdaptorPtr *)); +malloc ((num_adaptors +1 ) *sizeof (XF86VideoAdaptorPtr *));if (newAdaptors) {memcpy (newAdaptors, adaptors, num_adaptors *sizeof (XF86VideoAdaptorPtr));
@@ -189,7 +189,7 @@ void I810InitVideo(ScreenPtr pScreen)xf86XVScreenInit (pScreen, adaptors, num_adaptors);if (newAdaptors) -xfree (newAdaptors); +free (newAdaptors); }/* *INDENT-OFF* */
@@ -383,7 +383,7 @@ I810SetupImageVideo(ScreenPtr pScreen)XF86VideoAdaptorPtr adapt;I810PortPrivPtr pPriv; -if (!(adapt =xcalloc (1 ,sizeof (XF86VideoAdaptorRec) + +if (!(adapt =calloc (1 ,sizeof (XF86VideoAdaptorRec) +sizeof (I810PortPrivRec) +sizeof (DevUnion))))return NULL ;
@@ -1224,18 +1224,18 @@ I810AllocateSurface( surface->width = w; surface->height = h; -if (!(surface->pitches =xalloc (sizeof (int )))) { +if (!(surface->pitches =malloc (sizeof (int )))) {xf86FreeOffscreenLinear (linear);return BadAlloc; } -if (!(surface->offsets =xalloc (sizeof (int )))) { -xfree (surface->pitches); +if (!(surface->offsets =malloc (sizeof (int )))) { +free (surface->pitches);xf86FreeOffscreenLinear (linear);return BadAlloc; } -if (!(pPriv =xalloc (sizeof (OffscreenPrivRec)))) { -xfree (surface->pitches); -xfree (surface->offsets); +if (!(pPriv =malloc (sizeof (OffscreenPrivRec)))) { +free (surface->pitches); +free (surface->offsets);xf86FreeOffscreenLinear (linear);return BadAlloc; }
@@ -1285,9 +1285,9 @@ I810FreeSurface(I810StopSurface (surface); }xf86FreeOffscreenLinear (pPriv->linear); -xfree (surface->pitches); -xfree (surface->offsets); -xfree (surface->devPrivate.ptr); +free (surface->pitches); +free (surface->offsets); +free (surface->devPrivate.ptr);return Success; }
@@ -1400,7 +1400,7 @@ I810InitOffscreenImages(ScreenPtr pScreen)XF86OffscreenImagePtr offscreenImages;/* need to free this someplace */ -if (!(offscreenImages =xalloc (sizeof (XF86OffscreenImageRec)))) { +if (!(offscreenImages =malloc (sizeof (XF86OffscreenImageRec)))) {return ; }
src/i830_batchbuffer.c +1 -1
@@ -204,7 +204,7 @@ void intel_batch_submit(ScrnInfoPtr scrn)dri_bo_unreference (entry->bo);list_del (&entry->in_flight); -xfree (entry); +free (entry); }/* Save a ref to the last batch emitted, which we use for syncing
src/i830_dri.c +18 -18
@@ -93,12 +93,12 @@ I830DRI2CreateBuffers(DrawablePtr drawable, unsigned int *attachments,I830DRI2BufferPrivatePtr privates;PixmapPtr pixmap, pDepthPixmap; - buffers =xcalloc (count,sizeof *buffers); + buffers =calloc (count,sizeof *buffers);if (buffers ==NULL )return NULL ; - privates =xcalloc (count,sizeof *privates); + privates =calloc (count,sizeof *privates);if (privates ==NULL ) { -xfree (buffers); +free (buffers);return NULL ; }
@@ -174,12 +174,12 @@ I830DRI2CreateBuffer(DrawablePtr drawable, unsigned int attachment,I830DRI2BufferPrivatePtr privates;PixmapPtr pixmap; - buffer =xcalloc (1 ,sizeof *buffer); + buffer =calloc (1 ,sizeof *buffer);if (buffer ==NULL )return NULL ; - privates =xcalloc (1 ,sizeof *privates); + privates =calloc (1 ,sizeof *privates);if (privates ==NULL ) { -xfree (buffer); +free (buffer);return NULL ; }
@@ -251,8 +251,8 @@ I830DRI2DestroyBuffers(DrawablePtr drawable, DRI2BufferPtr buffers, int count) }if (buffers) { -xfree (buffers[0 ].driverPrivate); -xfree (buffers); +free (buffers[0 ].driverPrivate); +free (buffers); } }
@@ -266,8 +266,8 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer) screen->DestroyPixmap (private->pixmap); -xfree (private); -xfree (buffer); +free (private); +free (buffer); } }
@@ -473,7 +473,7 @@ I830DRI2ScheduleFlip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,DRI2FrameEventPtr flip_info;Bool ret; - flip_info =xcalloc (1 ,sizeof (DRI2FrameEventRec)); + flip_info =calloc (1 ,sizeof (DRI2FrameEventRec));if (!flip_info)return FALSE;
@@ -519,7 +519,7 @@ void I830DRI2FrameEventHandler(unsigned int frame, unsigned int tv_sec, status =dixLookupDrawable (&drawable, event->drawable_id, serverClient,M_ANY , DixWriteAccess);if (status != Success) { -xfree (event); +free (event);return ; }
@@ -575,7 +575,7 @@ void I830DRI2FrameEventHandler(unsigned int frame, unsigned int tv_sec,break ; } -xfree (event); +free (event); } void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,
@@ -590,7 +590,7 @@ void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec, status =dixLookupDrawable (&drawable, flip->drawable_id, serverClient,M_ANY , DixWriteAccess);if (status != Success) { -xfree (flip); +free (flip);return ; }
@@ -611,7 +611,7 @@ void I830DRI2FlipEventHandler(unsigned int frame, unsigned int tv_sec,break ; } -xfree (flip); +free (flip); }/*
@@ -656,7 +656,7 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, divisor &=0xffffffff ; remainder &=0xffffffff ; - swap_info =xcalloc (1 ,sizeof (DRI2FrameEventRec)); + swap_info =calloc (1 ,sizeof (DRI2FrameEventRec));/* Drawable not displayed... just complete the swap */ if (pipe ==-1 || !swap_info)
@@ -799,7 +799,7 @@ blit_fallback:DRI2SwapComplete (client, draw,0 ,0 ,0 ,DRI2_BLIT_COMPLETE , func, data);if (swap_info) -xfree (swap_info); +free (swap_info); *target_msc =0 ;/* offscreen, so zero out target vblank count */ return TRUE; }
@@ -870,7 +870,7 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,if (pipe ==-1 ) goto out_complete; - wait_info =xcalloc (1 ,sizeof (DRI2FrameEventRec)); + wait_info =calloc (1 ,sizeof (DRI2FrameEventRec));if (!wait_info) goto out_complete;
src/i830_driver.c +6 -6
@@ -246,7 +246,7 @@ static void I830FreeRec(ScrnInfoPtr scrn)if (!scrn->driverPrivate)return ; -xfree (scrn->driverPrivate); +free (scrn->driverPrivate); scrn->driverPrivate =NULL ; }
@@ -419,7 +419,7 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr scrn)/* Be nice to the user and load fbcon too */ if (!ret) (void )xf86LoadKernelModule ("fbcon" ); -xfree (busIdString); +free (busIdString);if (ret)return FALSE;
@@ -586,7 +586,7 @@ static Bool I830GetEarlyOptions(ScrnInfoPtr scrn)/* Process the options */ xf86CollectOptions (scrn,NULL ); -if (!(intel->Options =xalloc (sizeof (I830Options)))) +if (!(intel->Options =malloc (sizeof (I830Options))))return FALSE;memcpy (intel->Options, I830Options,sizeof (I830Options));xf86ProcessOptions (scrn->scrnIndex, scrn->options, intel->Options);
@@ -648,11 +648,11 @@ static Bool i830_open_drm_master(ScrnInfoPtr scrn)xf86DrvMsg (scrn->scrnIndex,X_ERROR ,"[drm] Failed to open DRM device for %s: %s\n" , busid,strerror (errno)); -xfree (busid); +free (busid);return FALSE; } -xfree (busid); +free (busid);/* Check that what we opened was a master or a master-capable FD, * by setting the version of the interface we'll use to talk to it.
@@ -1484,7 +1484,7 @@ static Bool I830CloseScreen(int scrnIndex, ScreenPtr screen)if (intel->uxa_driver) {uxa_driver_fini (screen); -xfree (intel->uxa_driver); +free (intel->uxa_driver); intel->uxa_driver =NULL ; }if (intel->front_buffer) {
src/i830_hwmc.c +2 -2
@@ -62,7 +62,7 @@ static int create_context(ScrnInfoPtr scrn, XvMCContextPtr pContext,intel_screen_private *intel =intel_get_screen_private (scrn);struct intel_xvmc_hw_context *contextRec; - *priv =xcalloc (1 ,sizeof (struct intel_xvmc_hw_context )); + *priv =calloc (1 ,sizeof (struct intel_xvmc_hw_context )); contextRec = (struct intel_xvmc_hw_context *) *priv;if (!contextRec) { *num_priv =0 ;
@@ -207,7 +207,7 @@ Bool intel_xvmc_adaptor_init(ScreenPtr pScreen)return FALSE; } - pAdapt =xcalloc (1 ,sizeof (XF86MCAdaptorRec)); + pAdapt =calloc (1 ,sizeof (XF86MCAdaptorRec));if (!pAdapt) {ErrorF ("Allocation error.\n" );return FALSE;
src/i830_uxa.c +5 -5
@@ -581,7 +581,7 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)int ret;if (priv ==NULL ) { - priv =xcalloc (1 ,sizeof (struct intel_pixmap )); + priv =calloc (1 ,sizeof (struct intel_pixmap ));if (priv ==NULL ) goto BAIL;
@@ -602,7 +602,7 @@ void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo) } }else {if (priv !=NULL ) { -xfree (priv); +free (priv); priv =NULL ; } }
@@ -999,7 +999,7 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth, } } - priv =xcalloc (1 ,sizeof (struct intel_pixmap )); + priv =calloc (1 ,sizeof (struct intel_pixmap ));if (priv ==NULL ) {fbDestroyPixmap (pixmap);return NullPixmap;
@@ -1013,7 +1013,7 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,"pixmap" , size, 0);if (!priv->bo) { -xfree (priv); +free (priv);fbDestroyPixmap (pixmap);return NullPixmap; }
@@ -1120,7 +1120,7 @@ Bool i830_uxa_init(ScreenPtr screen)if (!uxa_driver_init (screen, intel->uxa_driver)) {xf86DrvMsg (scrn->scrnIndex,X_ERROR ,"UXA initialization failed\n" ); -xfree (intel->uxa_driver); +free (intel->uxa_driver);return FALSE; }
src/i830_video.c +11 -11
@@ -350,7 +350,7 @@ void I830InitVideo(ScreenPtr screen)* adaptors. */ newAdaptors = -xalloc ((num_adaptors +2 ) *sizeof (XF86VideoAdaptorPtr *)); +malloc ((num_adaptors +2 ) *sizeof (XF86VideoAdaptorPtr *));if (newAdaptors ==NULL )return ;
@@ -413,7 +413,7 @@ void I830InitVideo(ScreenPtr screen)if (texturedAdaptor)intel_xvmc_adaptor_init (screen);#endif -xfree (adaptors); +free (adaptors); }static XF86VideoAdaptorPtr I830SetupImageVideoOverlay (ScreenPtr screen)
@@ -426,7 +426,7 @@ static XF86VideoAdaptorPtr I830SetupImageVideoOverlay(ScreenPtr screen)OVERLAY_DEBUG ("I830SetupImageVideoOverlay\n" ); -if (!(adapt =xcalloc (1 ,sizeof (XF86VideoAdaptorRec) + +if (!(adapt =calloc (1 ,sizeof (XF86VideoAdaptorRec) +sizeof (intel_adaptor_private) +sizeof (DevUnion))))return NULL ;
@@ -536,16 +536,16 @@ static XF86VideoAdaptorPtr I830SetupImageVideoTextured(ScreenPtr screen) nAttributes =NUM_TEXTURED_ATTRIBUTES ; - adapt =xcalloc (1 ,sizeof (XF86VideoAdaptorRec)); - adaptor_privs =xcalloc (nports,sizeof (intel_adaptor_private)); - devUnions =xcalloc (nports,sizeof (DevUnion)); - attrs =xcalloc (nAttributes,sizeof (XF86AttributeRec)); + adapt =calloc (1 ,sizeof (XF86VideoAdaptorRec)); + adaptor_privs =calloc (nports,sizeof (intel_adaptor_private)); + devUnions =calloc (nports,sizeof (DevUnion)); + attrs =calloc (nAttributes,sizeof (XF86AttributeRec));if (adapt ==NULL || adaptor_privs ==NULL || devUnions ==NULL || attrs ==NULL ) { -xfree (adapt); -xfree (adaptor_privs); -xfree (devUnions); -xfree (attrs); +free (adapt); +free (adaptor_privs); +free (devUnions); +free (attrs);return NULL ; }
src/xvmc/I810XvMC.c +1 -1
@@ -4323,7 +4323,7 @@ static XvAttribute I810_XVMC_ATTRIBUTES[] = {// Function: XvMCQueryAttributes // Description: An array of XvAttributes of size "number" is returned by // this function. If there are no attributes, NULL is returned and number -// is set to 0. The array may be freed with xfree(). +// is set to 0. The array may be freed with free(). // // Arguments: // display - Connection to the X server.
src/xvmc/i965_xvmc.c +1 -1
@@ -243,7 +243,7 @@ static Status destroy_context(Display * display, XvMCContext * context) {struct intel_xvmc_context *intel_ctx; intel_ctx = context->privData; -Xfree (intel_ctx->hw); +free (intel_ctx->hw);free (intel_ctx);return Success; }
src/xvmc/intel_xvmc.c +1 -1
@@ -987,7 +987,7 @@ _X_EXPORT Status XvMCGetSubpictureStatus(Display * display,* Function: XvMCQueryAttributes * Description: An array of XvAttributes of size "number" is returned by * this function. If there are no attributes, NULL is returned and number -* is set to 0. The array may be freed with xfree(). +* is set to 0. The array may be freed with free(). * * Arguments: * display - Connection to the X server.
src/xvmc/xvmc_vld.c +1 -1
@@ -621,7 +621,7 @@ static Status destroy_context(Display * display, XvMCContext * context) {struct intel_xvmc_context *intel_ctx; intel_ctx = context->privData; -Xfree (intel_ctx->hw); +free (intel_ctx->hw);free (intel_ctx);return Success; }
uxa/uxa-accel.c +7 -7
@@ -558,7 +558,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,return ; } - prect =xalloc (sizeof (xRectangle) * npt); + prect =malloc (sizeof (xRectangle) * npt);if (!prect)return ;for (i =0 ; i < npt; i++) {
@@ -572,7 +572,7 @@ uxa_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, prect[i].height =1 ; } pGC->ops->PolyFillRect (pDrawable, pGC, npt, prect); -xfree (prect); +free (prect); }/**
@@ -595,7 +595,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,return ; } - prect =xalloc (sizeof (xRectangle) * (npt -1 )); + prect =malloc (sizeof (xRectangle) * (npt -1 ));if (!prect)return ; x1 = ppt[0 ].x;
@@ -611,7 +611,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, }if (x1 != x2 && y1 != y2) { -xfree (prect); +free (prect);uxa_check_poly_lines (pDrawable, pGC, mode, npt, ppt);return ; }
@@ -635,7 +635,7 @@ uxa_poly_lines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, y1 = y2; } pGC->ops->PolyFillRect (pDrawable, pGC, npt -1 , prect); -xfree (prect); +free (prect); }/**
@@ -664,7 +664,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) } } - prect =xalloc (sizeof (xRectangle) * nseg); + prect =malloc (sizeof (xRectangle) * nseg);if (!prect)return ;for (i =0 ; i < nseg; i++) {
@@ -692,7 +692,7 @@ uxa_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) } } pGC->ops->PolyFillRect (pDrawable, pGC, nseg, prect); -xfree (prect); +free (prect); } static Bool uxa_fill_region_solid(DrawablePtr pDrawable, RegionPtr pRegion,
uxa/uxa-glyphs.c +4 -4
@@ -131,12 +131,12 @@ static void uxa_unrealize_glyph_caches(ScreenPtr pScreen, unsigned int format) }if (cache->hashEntries) { -xfree (cache->hashEntries); +free (cache->hashEntries); cache->hashEntries =NULL ; }if (cache->glyphs) { -xfree (cache->glyphs); +free (cache->glyphs); cache->glyphs =NULL ; } cache->glyphCount =0 ;
@@ -216,9 +216,9 @@ static Bool uxa_realize_glyph_caches(ScreenPtr pScreen, unsigned int format) cache->picture = pPicture; cache->picture->refcnt++; - cache->hashEntries =xalloc (sizeof (int ) * cache->hashSize); + cache->hashEntries =malloc (sizeof (int ) * cache->hashSize); cache->glyphs = -xalloc (sizeof (uxa_cached_glyph_t) * cache->size); +malloc (sizeof (uxa_cached_glyph_t) * cache->size); cache->glyphCount =0 ;if (!cache->hashEntries || !cache->glyphs)
uxa/uxa.c +4 -4
@@ -401,7 +401,7 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen) }#endif -xfree (uxa_screen); +free (uxa_screen);return (*pScreen->CloseScreen) (i, pScreen); }
@@ -412,13 +412,13 @@ static Bool uxa_close_screen(int i, ScreenPtr pScreen)* without breaking ABI between UXA and the drivers. The driver's * responsibility is to check beforehand that the UXA module has a matching * major number and sufficient minor. Drivers are responsible for freeing the -* driver structure using xfree(). +* driver structure using free(). * * @return a newly allocated, zero-filled driver structure */ uxa_driver_t *uxa_driver_alloc (void ) { -return xcalloc (1 ,sizeof (uxa_driver_t)); +return calloc (1 ,sizeof (uxa_driver_t)); }/**
@@ -475,7 +475,7 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver)return FALSE;#endif - uxa_screen =xcalloc (sizeof (uxa_screen_t),1 ); + uxa_screen =calloc (sizeof (uxa_screen_t),1 );if (!uxa_screen) { LogMessage(X_WARNING,
Signature · 1 line
1.7.1