diff --git a/dix/colormap.c b/dix/colormap.c index a13538889..ab1dba79d 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -1485,13 +1485,14 @@ FreeClientPixels(void *value, XID fakeid) } int -AllocColorCells(int client, ColormapPtr pmap, int colors, int planes, +AllocColorCells(ClientPtr pClient, ColormapPtr pmap, int colors, int planes, Bool contig, Pixel * ppix, Pixel * masks) { Pixel rmask, gmask, bmask, *ppixFirst, r, g, b; int n, class; int ok; int oldcount; + const int client = pClient->index; colorResource *pcr = (colorResource *) NULL; class = pmap->class; diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h index 04a55b07a..382f5aff5 100644 --- a/dix/colormap_priv.h +++ b/dix/colormap_priv.h @@ -46,7 +46,7 @@ int QueryColors(ColormapPtr pmap, int count, Pixel *ppixIn, /* should only be called via resource type's destructor */ int FreeClientPixels(void *pcr, XID fakeid); -int AllocColorCells(int client, ColormapPtr pmap, int colors, int planes, +int AllocColorCells(ClientPtr pClient, ColormapPtr pmap, int colors, int planes, Bool contig, Pixel *ppix, Pixel *masks); int AllocColorPlanes(int client, ColormapPtr pmap, int colors, int r, int g, diff --git a/dix/dispatch.c b/dix/dispatch.c index 0d7f98341..a5867d2d2 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2707,7 +2707,7 @@ ProcAllocColorCells(ClientPtr client) return BadAlloc; pmasks = ppixels + npixels; - if ((rc = AllocColorCells(client->index, pcmp, npixels, nmasks, + if ((rc = AllocColorCells(client, pcmp, npixels, nmasks, (Bool) stuff->contiguous, ppixels, pmasks))) { free(ppixels); return rc;