From 7181160b2c32b1bb804792990783fa25c1122bae Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 17 Oct 2022 17:57:19 -0700 Subject: Remove unnecessary casts of return values from malloc() Not needed in C89 and later Signed-off-by: Alan Coopersmith --- src/XrrProvider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/XrrProvider.c') diff --git a/src/XrrProvider.c b/src/XrrProvider.c index 1c7c43b..a514b3f 100644 --- a/src/XrrProvider.c +++ b/src/XrrProvider.c @@ -67,7 +67,7 @@ XRRGetProviderResources(Display *dpy, Window window) rbytes = (sizeof(XRRProviderResources) + rep.nProviders * sizeof(RRProvider)); - xrpr = (XRRProviderResources *) Xmalloc(rbytes); + xrpr = Xmalloc(rbytes); } else { nbytes = 0; nbytesRead = 0; @@ -150,7 +150,7 @@ XRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provi rep.nAssociatedProviders * (sizeof(RRProvider) + sizeof(unsigned int))+ rep.nameLength + 1); - xpi = (XRRProviderInfo *)Xmalloc(rbytes); + xpi = Xmalloc(rbytes); if (xpi == NULL) { _XEatDataWords (dpy, rep.length); UnlockDisplay (dpy); -- cgit v1.2.3