diff options
author | Adam Jackson <ajax@redhat.com> | 2014-06-10 13:00:11 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2014-07-29 09:52:22 -0400 |
commit | 2db71b232c4756773562182cadb7ccdf5194a62d (patch) | |
tree | 93bf788506ebc0e732494a390c7b742aba18ec61 /Xext/saver.c | |
parent | dd0e8491f75afbd72bea17172a042aa45ff7e30b (diff) |
saver: Don't open-code IsMapInstalled
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'Xext/saver.c')
-rw-r--r-- | Xext/saver.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/Xext/saver.c b/Xext/saver.c index 8e92fdf2f..2c14ea00e 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -467,9 +467,6 @@ CreateSaverWindow(ScreenPtr pScreen) WindowPtr pWin; int result; unsigned long mask; - Colormap *installedMaps; - int numInstalled; - int i; Colormap wantMap; ColormapPtr pCmap; @@ -545,18 +542,7 @@ CreateSaverWindow(ScreenPtr pScreen) /* check and install our own colormap if it isn't installed now */ wantMap = wColormap(pWin); - if (wantMap == None) - return TRUE; - installedMaps = malloc(pScreen->maxInstalledCmaps * sizeof(Colormap)); - numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) - (pScreen, installedMaps); - for (i = 0; i < numInstalled; i++) - if (installedMaps[i] == wantMap) - break; - - free((char *) installedMaps); - - if (i < numInstalled) + if (wantMap == None || IsMapInstalled(wantMap, pWin)) return TRUE; result = dixLookupResourceByType((void **) &pCmap, wantMap, RT_COLORMAP, |