Commit 528e1e4e authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXpicture.c: code simplification

parent bb08043a
...@@ -303,21 +303,17 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) ...@@ -303,21 +303,17 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
static PicturePtr createSourcePicture(void) static PicturePtr createSourcePicture(void)
{ {
PicturePtr pPicture;
extern int nxagentPicturePrivateIndex; extern int nxagentPicturePrivateIndex;
unsigned int totalPictureSize;
/* /*
* Compute size of entire PictureRect, plus privates. * Compute size of entire PictureRect, plus privates.
*/ */
totalPictureSize = sizeof(PictureRec) + unsigned int totalPictureSize = sizeof(PictureRec) +
picturePrivateCount * sizeof(DevUnion) + picturePrivateCount * sizeof(DevUnion) +
sizeof(nxagentPrivPictureRec); sizeof(nxagentPrivPictureRec);
pPicture = (PicturePtr) calloc(1, totalPictureSize); PicturePtr pPicture = (PicturePtr) calloc(1, totalPictureSize);
if (!pPicture) if (!pPicture)
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment