aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-09-06 03:38:37 +0200
committerUlrich Sibiller <uli42@gmx.de>2020-01-05 22:37:36 +0100
commitda60cb8cac23460c0ca4a8fa8014a3461fb5bdfa (patch)
tree92255691a2991af62174e42e7c5d32f408a43850
parentfb03e31e564aa16128054038e66b9341eb5c7055 (diff)
downloadnx-libs-da60cb8cac23460c0ca4a8fa8014a3461fb5bdfa.tar.gz
nx-libs-da60cb8cac23460c0ca4a8fa8014a3461fb5bdfa.tar.bz2
nx-libs-da60cb8cac23460c0ca4a8fa8014a3461fb5bdfa.zip
GC.c: code simplifications / scope improvements
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GC.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c
index 9d3ce2741..e7be173b3 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GC.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c
@@ -1112,10 +1112,9 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
case CT_REGION:
if (nxagentGCPriv(pGC)->pPixmap == NULL)
{
- XRectangle *pRects;
nRects = RegionNumRects((RegionPtr)pValue);
- int size = nRects * sizeof(*pRects);
- pRects = (XRectangle *) malloc(size);
+ int size = nRects * sizeof(XRectangle *);
+ XRectangle *pRects = (XRectangle *) malloc(size);
BoxPtr pBox = RegionRects((RegionPtr)pValue);
for (int i = nRects; i-- > 0;) {
pRects[i].x = pBox[i].x1;
@@ -1409,12 +1408,12 @@ GCPtr nxagentCreateGraphicContext(int depth)
return NULL;
}
- XID attributes[2];
-
/*
* Color used in nxagentFillRemoteRegion().
*/
+ XID attributes[2];
+
attributes[0] = 0xc1c1c1;
if (depth == 15 || depth == 16)