[PATCH newport] Replace X{c, r, }alloc and Xfree for stdlib functions

Jeremy Huddleston jeremyhu at apple.com
Mon Dec 13 11:53:20 PST 2010


Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>

On Dec 13, 2010, at 09:55, Paulo Zanoni wrote:

> 
> Signed-off-by: Paulo Zanoni <pzanoni at mandriva.com>
> ---
> src/newport_cursor.c |    2 +-
> src/newport_driver.c |    8 ++++----
> 2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/newport_cursor.c b/src/newport_cursor.c
> index 3264de4..37b7492 100644
> --- a/src/newport_cursor.c
> +++ b/src/newport_cursor.c
> @@ -125,7 +125,7 @@ static unsigned char* NewportRealizeCursor(xf86CursorInfoPtr infoPtr, CursorPtr
> 	CARD32 *mem, *SrcS, *SrcM, *DstS;
> 	unsigned int i;
> 
> -	if (!(mem = xcalloc(1, size)))
> +	if (!(mem = calloc(1, size)))
>         	return NULL;
> 
> 	SrcS = (CARD32*)pCurs->bits->source;
> diff --git a/src/newport_driver.c b/src/newport_driver.c
> index 6bd7c9f..5fb6f18 100644
> --- a/src/newport_driver.c
> +++ b/src/newport_driver.c
> @@ -189,7 +189,7 @@ NewportFreeRec(ScrnInfoPtr pScrn)
> {
> 	if (pScrn->driverPrivate == NULL)
> 		return TRUE;
> -	xfree(pScrn->driverPrivate);
> +	free(pScrn->driverPrivate);
> 	pScrn->driverPrivate = NULL;
> 	return TRUE;
> }
> @@ -255,7 +255,7 @@ NewportProbe(DriverPtr drv, int flags)
> 			}
> 		}
> 	}
> -	xfree(devSections);
> +	free(devSections);
> 	return foundScreen;
> }
> 
> @@ -354,7 +354,7 @@ NewportPreInit(ScrnInfoPtr pScrn, int flags)
> 
> 	/* Fill in pScrn->options) */
> 	xf86CollectOptions(pScrn, NULL);
> -	if (!(pNewport->Options = xalloc(sizeof(NewportOptions))))
> +	if (!(pNewport->Options = malloc(sizeof(NewportOptions))))
> 		return FALSE;
> 	memcpy(pNewport->Options, NewportOptions, sizeof(NewportOptions));
> 	xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pNewport->Options);
> @@ -655,7 +655,7 @@ NewportCloseScreen(int scrnIndex, ScreenPtr pScreen)
> 
> 	NewportRestore(pScrn, TRUE);
> 	if (pNewport->ShadowPtr)
> -		xfree(pNewport->ShadowPtr);
> +		free(pNewport->ShadowPtr);
> 
> 	/* unmap the Newport's registers from memory */
> 	NewportUnmapRegs(pScrn);
> -- 
> 1.7.1
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list