From 528e1e4ef520506733ac3eeef374fcca41214cd1 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 20 Jun 2019 01:31:17 +0200 Subject: NXpicture.c: code simplification --- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index 01821f474..491af5b30 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -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; -- cgit v1.2.3