summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Eckhardt <doomster@knuut.de>2008-10-06 14:02:24 -0700
committerBart Massey <bart@cs.pdx.edu>2008-10-06 14:02:24 -0700
commit1c985f3a37e12b8b4bf45122bb33962ddf5e6ef4 (patch)
treeac8c3dd18a09a143ded450fa04d2819c4a00c3f5
parenta58f567df29c433f5cc7ffd4280aadea10a48fed (diff)
Do not cast the return value of malloc() in modern C.
Signed-off-by: Bart Massey <bart@cs.pdx.edu>
-rw-r--r--image/xcb_image.c2
-rw-r--r--keysyms/keysyms.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/image/xcb_image.c b/image/xcb_image.c
index 2388948..701dda4 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -227,7 +227,7 @@ xcb_image_create (uint16_t width,
}
if (!format_valid(depth, bpp, unit, format, xpad))
return 0;
- image = (xcb_image_t *)malloc(sizeof(*image));
+ image = malloc(sizeof(*image));
if (image == 0)
return 0;
image->width = width;
diff --git a/keysyms/keysyms.c b/keysyms/keysyms.c
index 83c1d3d..4f432d1 100644
--- a/keysyms/keysyms.c
+++ b/keysyms/keysyms.c
@@ -49,7 +49,7 @@ xcb_key_symbols_alloc (xcb_connection_t *c)
if (!c)
return NULL;
- syms = (xcb_key_symbols_t *)malloc (sizeof (xcb_key_symbols_t));
+ syms = malloc (sizeof (xcb_key_symbols_t));
syms->c = c;
syms->tag = TAG_COOKIE;