[PATCH 3/4] Replace deprecated bzero with memset

Marcin Baczyński marbacz at gmail.com
Fri Jun 4 03:40:30 PDT 2010


> diff --git a/dix/colormap.c b/dix/colormap.c
> index 12197ac..b10727d 100644
> --- a/dix/colormap.c
> +++ b/dix/colormap.c
> @@ -298,8 +298,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
>     if ((class | DynamicClass) == DirectColor)
>        size = NUMRED(pVisual);
>     pmap->freeRed = size;
> -    bzero ((char *) pmap->red, (int)sizebytes);
> -    bzero((char *) pmap->numPixelsRed, MAXCLIENTS * sizeof(int));
> +    memset((char *) pmap->red, 0, (int)sizebytes);
> +    memset((char *) pmap->numPixelsRed, 0, MAXCLIENTS * sizeof(int));

Aren't these char * casts superfluous?


More information about the xorg-devel mailing list