diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-01-05 22:46:24 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-01-05 22:46:24 +0100 |
commit | a261b72435d7d30dbe36529a51fc53f6ade34dff (patch) | |
tree | fde666b59abbe3bdf0ed574147344c0d25075b03 /nx-X11/programs/Xserver/hw/nxagent/Colormap.c | |
parent | 0e2b7479cd4567128fbcd975e5376744d78cd416 (diff) | |
parent | adca0cc92abed6f7f6184b91d807a4befb80e856 (diff) | |
download | nx-libs-a261b72435d7d30dbe36529a51fc53f6ade34dff.tar.gz nx-libs-a261b72435d7d30dbe36529a51fc53f6ade34dff.tar.bz2 nx-libs-a261b72435d7d30dbe36529a51fc53f6ade34dff.zip |
Merge branch 'uli42-pr/code_cleanup' into 3.6.x
Attributes GH PR #869: https://github.com/ArcticaProject/nx-libs/pull/869
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Colormap.c')
-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)); } |