From 90bb47685ed92df1eb5bbb9b6875a40f3e98bb43 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 17 Nov 2022 10:55:07 -0800 Subject: Remove unnecessary casts from malloc() and free() calls Not needed in C89 and later Signed-off-by: Alan Coopersmith --- src/Xdamage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Xdamage.c b/src/Xdamage.c index 61fe4e6..55b1824 100644 --- a/src/Xdamage.c +++ b/src/Xdamage.c @@ -51,7 +51,7 @@ XDamageExtAddDisplay (XDamageExtInfo *extinfo, { XDamageExtDisplayInfo *info; - info = (XDamageExtDisplayInfo *) Xmalloc (sizeof (XDamageExtDisplayInfo)); + info = Xmalloc (sizeof (XDamageExtDisplayInfo)); if (!info) return NULL; info->display = dpy; @@ -155,7 +155,7 @@ XDamageExtRemoveDisplay (XDamageExtInfo *extinfo, const Display *dpy) if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */ _XUnlockMutex(_Xglobal_lock); - Xfree ((char *) info); + Xfree (info); return 1; } -- cgit v1.2.3