From ace3d2d89a4a3783aa6033f3bd9d4e38b48e11c9 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 22 Oct 2019 22:40:49 +0200 Subject: Colormap.c: save some lines --- nx-X11/programs/Xserver/hw/nxagent/Colormap.c | 10 +++------- 1 file 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)); } -- cgit v1.2.3