summaryrefslogtreecommitdiff
path: root/src/XrrProvider.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-17 17:57:19 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-17 17:57:19 -0700
commit7181160b2c32b1bb804792990783fa25c1122bae (patch)
tree2c5f013564d9ee3a00b02e42fe6ca029772f0d7d /src/XrrProvider.c
parent8710ed270fbb9ec905b906826cb09095c57003f8 (diff)
downloadxorg-lib-libXrandr-7181160b2c32b1bb804792990783fa25c1122bae.tar.gz
Remove unnecessary casts of return values from malloc()
Not needed in C89 and later Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/XrrProvider.c')
-rw-r--r--src/XrrProvider.c4
1 files changed, 2 insertions, 2 deletions
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);