diff options
Diffstat (limited to 'src/LookupCmap.c')
-rw-r--r-- | src/LookupCmap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/LookupCmap.c b/src/LookupCmap.c index 4a52290..31b339a 100644 --- a/src/LookupCmap.c +++ b/src/LookupCmap.c @@ -242,8 +242,7 @@ lookup(Display *dpy, int screen, VisualID visualid, Atom property, if (cnew) { XStandardColormap *m, *maps; - s = (XStandardColormap *) malloc((unsigned) ((count+1) * sizeof - (XStandardColormap))); + s = malloc((unsigned) ((count+1) * sizeof(XStandardColormap))); for (i = 0, m = s, maps = stdcmaps; i < count; i++, m++, maps++) { m->colormap = maps->colormap; @@ -269,7 +268,7 @@ lookup(Display *dpy, int screen, VisualID visualid, Atom property, m->killid = cnew->killid; XSetRGBColormaps(dpy, win, s, ++count, property); - free((char *) s); + free(s); } XFree((char *) stdcmaps); return 0; |