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)
static PicturePtr createSourcePicture(void)
{
PicturePtr pPicture;
extern int nxagentPicturePrivateIndex;
unsigned int totalPictureSize;
/*
* Compute size of entire PictureRect, plus privates.
*/
totalPictureSize = sizeof(PictureRec) +
unsigned int totalPictureSize = sizeof(PictureRec) +
picturePrivateCount * sizeof(DevUnion) +
sizeof(nxagentPrivPictureRec);
pPicture = (PicturePtr) calloc(1, totalPictureSize);
PicturePtr pPicture = (PicturePtr) calloc(1, totalPictureSize);
if (!pPicture)
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