summaryrefslogtreecommitdiffstats
path: root/xlib/xutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlib/xutil.c')
-rw-r--r--xlib/xutil.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlib/xutil.c b/xlib/xutil.c
index 103d995..b265e5d 100644
--- a/xlib/xutil.c
+++ b/xlib/xutil.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: xutil.c,v 1.4 2007/01/02 23:39:40 dkf Exp $
+ * RCS: @(#) $Id: xutil.c,v 1.5 2010/02/19 13:41:49 dkf Exp $
*/
#include <stdlib.h>
@@ -70,7 +70,8 @@ XGetVisualInfo(
XVisualInfo *vinfo_template,
int *nitems_return)
{
- XVisualInfo *info = (XVisualInfo *) ckalloc(sizeof(XVisualInfo));
+ XVisualInfo *info = ckalloc(sizeof(XVisualInfo));
+
info->visual = DefaultVisual(display, 0);
info->visualid = info->visual->visualid;
info->screen = 0;
@@ -101,7 +102,7 @@ XGetVisualInfo(
|| ((vinfo_mask & VisualBlueMaskMask)
&& (vinfo_template->blue_mask != info->blue_mask))
) {
- ckfree((char *) info);
+ ckfree(info);
return NULL;
}