aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-20 01:31:17 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-06-22 11:30:47 +0200
commit528e1e4ef520506733ac3eeef374fcca41214cd1 (patch)
tree8751c8d4712666cd3f94fd2669bdde99d5ebc689
parentbb08043a65ba7e600fafaa3c703915fcb8ad79d4 (diff)
downloadnx-libs-528e1e4ef520506733ac3eeef374fcca41214cd1.tar.gz
nx-libs-528e1e4ef520506733ac3eeef374fcca41214cd1.tar.bz2
nx-libs-528e1e4ef520506733ac3eeef374fcca41214cd1.zip
NXpicture.c: code simplification
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicture.c8
1 files changed, 2 insertions, 6 deletions
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;