diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-10-22 22:40:49 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2020-01-05 22:37:35 +0100 |
commit | ace3d2d89a4a3783aa6033f3bd9d4e38b48e11c9 (patch) | |
tree | 40c0507398ba870851cc036332d71d5447f15036 | |
parent | fae611c91be11511a673ce99513099b4e70ff3d9 (diff) | |
download | nx-libs-ace3d2d89a4a3783aa6033f3bd9d4e38b48e11c9.tar.gz nx-libs-ace3d2d89a4a3783aa6033f3bd9d4e38b48e11c9.tar.bz2 nx-libs-ace3d2d89a4a3783aa6033f3bd9d4e38b48e11c9.zip |
Colormap.c: save some lines
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Colormap.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c index b04977887..9308390fe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c @@ -296,12 +296,10 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) */ if (icws.numWindows) { - WindowPtr pWin; - Visual *visual; ColormapPtr pCmap; - pWin = nxagentWindowPtr(icws.windows[0]); - visual = nxagentVisualFromID(pScreen, wVisual(pWin)); + WindowPtr pWin = nxagentWindowPtr(icws.windows[0]); + Visual *visual = nxagentVisualFromID(pScreen, wVisual(pWin)); if (visual == nxagentDefaultVisual(pScreen)) pCmap = (ColormapPtr)LookupIDByType(wColormap(pWin), @@ -380,9 +378,7 @@ void nxagentDirectUninstallColormaps(ScreenPtr pScreen) int n = (*pScreen->ListInstalledColormaps)(pScreen, pCmapIDs); for (int i = 0; i < n; i++) { - ColormapPtr pCmap; - - pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP); + ColormapPtr pCmap = (ColormapPtr)LookupIDByType(pCmapIDs[i], RT_COLORMAP); if (pCmap) XUninstallColormap(nxagentDisplay, nxagentColormap(pCmap)); } |