diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-06-10 16:16:22 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-06-10 16:19:39 -0700 |
commit | bba869e4ff5826d48ea409b4a8bf4ff7ad414453 (patch) | |
tree | 1aacbe49fbbb631e26d68e9d0687e38a347241f3 | |
parent | ace42fef753c1444cfc208da6bb282abbbc279ab (diff) | |
download | xorg-lib-libXext-bba869e4ff5826d48ea409b4a8bf4ff7ad414453.tar.gz |
Remove unnecessary (char *) casts from Xfree() arguments
These also haven't been needed since C89
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/XMultibuf.c | 6 | ||||
-rw-r--r-- | src/XShm.c | 2 | ||||
-rw-r--r-- | src/Xcup.c | 6 | ||||
-rw-r--r-- | src/Xdbe.c | 6 | ||||
-rw-r--r-- | src/extutil.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/XMultibuf.c b/src/XMultibuf.c index b2cab33..28c2af4 100644 --- a/src/XMultibuf.c +++ b/src/XMultibuf.c @@ -201,7 +201,7 @@ static XmbufBufferInfo *read_buffer_info (Display *dpy, int nbufs) c->depth = net->depth; } } - Xfree ((char *) netbuf); + Xfree (netbuf); } else { /* eat the data */ while (netbytes > 0) { char dummy[256]; /* stack size vs loops tradeoff */ @@ -576,8 +576,8 @@ Status XmbufGetScreenInfo ( /* check for bad reads indicating we need to return an error */ if ((nmono > 0 && !minfo) || (nstereo > 0 && !sinfo)) { - if (minfo) Xfree ((char *) minfo); - if (sinfo) Xfree ((char *) sinfo); + if (minfo) Xfree (minfo); + if (sinfo) Xfree (sinfo); UnlockDisplay (dpy); SyncHandle(); return 0; @@ -262,7 +262,7 @@ Bool XShmDetach(Display *dpy, XShmSegmentInfo *shminfo) static int _XShmDestroyImage (XImage *ximage) { - Xfree((char *)ximage); + Xfree(ximage); return 1; } @@ -170,12 +170,12 @@ XcupGetReservedColormapEntries( cd->blue = cs->blue; cs = (xColorItem*) (((char*) cs) + SIZEOF(xColorItem)); } - if (rbufp != rbuf) XFree ((char*) rbufp); + if (rbufp != rbuf) XFree (rbufp); UnlockDisplay(dpy); SyncHandle(); return True; } - if (rbufp != rbuf) XFree ((char*) rbufp); + if (rbufp != rbuf) XFree (rbufp); } UnlockDisplay(dpy); SyncHandle(); @@ -251,7 +251,7 @@ XcupStoreColors( xcp->blue = cs->blue; xcp->flags = cs->flags; } - if (rbufp != rbuf) XFree ((char*)rbufp); + if (rbufp != rbuf) XFree (rbufp); UnlockDisplay(dpy); SyncHandle(); @@ -372,14 +372,14 @@ XdbeScreenVisualInfo *XdbeGetVisualInfo ( scrVisInfo[i].visinfo = NULL; /* if we can not allocate the list of visual/depth info - * then free the lists that we already allocate as well + * then free the lists that we already allocated as well * as the visual info list itself */ if (scrVisInfo[i].visinfo == NULL) { for (j = 0; j < i; j++) { - Xfree ((char *)scrVisInfo[j].visinfo); + Xfree (scrVisInfo[j].visinfo); } - Xfree ((char *)scrVisInfo); + Xfree (scrVisInfo); _XEatDataWords(dpy, rep.length); UnlockDisplay (dpy); SyncHandle (); diff --git a/src/extutil.c b/src/extutil.c index 26f90b2..a65322a 100644 --- a/src/extutil.c +++ b/src/extutil.c @@ -82,7 +82,7 @@ void XextDestroyExtension (XExtensionInfo *info) info->head = NULL; /* to catch refs after this */ info->cur = NULL; info->ndisplays = 0; - XFree ((char *) info); + XFree (info); } @@ -202,7 +202,7 @@ int XextRemoveDisplay (XExtensionInfo *extinfo, Display *dpy) if (dpyinfo == extinfo->cur) extinfo->cur = NULL; /* flush cache */ _XUnlockMutex(_Xglobal_lock); - Xfree ((char *) dpyinfo); + Xfree (dpyinfo); return 1; } |