Commit da60cb8c authored by Ulrich Sibiller's avatar Ulrich Sibiller

GC.c: code simplifications / scope improvements

parent fb03e31e
...@@ -1112,10 +1112,9 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects) ...@@ -1112,10 +1112,9 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
case CT_REGION: case CT_REGION:
if (nxagentGCPriv(pGC)->pPixmap == NULL) if (nxagentGCPriv(pGC)->pPixmap == NULL)
{ {
XRectangle *pRects;
nRects = RegionNumRects((RegionPtr)pValue); nRects = RegionNumRects((RegionPtr)pValue);
int size = nRects * sizeof(*pRects); int size = nRects * sizeof(XRectangle *);
pRects = (XRectangle *) malloc(size); XRectangle *pRects = (XRectangle *) malloc(size);
BoxPtr pBox = RegionRects((RegionPtr)pValue); BoxPtr pBox = RegionRects((RegionPtr)pValue);
for (int i = nRects; i-- > 0;) { for (int i = nRects; i-- > 0;) {
pRects[i].x = pBox[i].x1; pRects[i].x = pBox[i].x1;
...@@ -1409,12 +1408,12 @@ GCPtr nxagentCreateGraphicContext(int depth) ...@@ -1409,12 +1408,12 @@ GCPtr nxagentCreateGraphicContext(int depth)
return NULL; return NULL;
} }
XID attributes[2];
/* /*
* Color used in nxagentFillRemoteRegion(). * Color used in nxagentFillRemoteRegion().
*/ */
XID attributes[2];
attributes[0] = 0xc1c1c1; attributes[0] = 0xc1c1c1;
if (depth == 15 || depth == 16) if (depth == 15 || depth == 16)
......
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