summaryrefslogtreecommitdiff
path: root/src/Xv.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-06-22 11:07:13 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-05 21:14:42 -0700
commit89dc3ff457644271b1c633efa9682ae45e55d9d8 (patch)
tree112fb790b9be24828eaf6e4bd8db599f49bf2d88 /src/Xv.c
parent54851e0e72e2017c14c504459078c97d6112696b (diff)
Remove unnecessary casts from Xmalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Diffstat (limited to 'src/Xv.c')
-rw-r--r--src/Xv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Xv.c b/src/Xv.c
index ee80959..5df5464 100644
--- a/src/Xv.c
+++ b/src/Xv.c
@@ -190,7 +190,7 @@ XvQueryAdaptors(
}
size = rep.length << 2;
- if ((buffer = (char *) Xmalloc((unsigned) size)) == NULL) {
+ if ((buffer = Xmalloc(size)) == NULL) {
UnlockDisplay(dpy);
SyncHandle();
return (XvBadAlloc);
@@ -206,7 +206,7 @@ XvQueryAdaptors(
}
else {
size = rep.num_adaptors * sizeof(XvAdaptorInfo);
- if ((pas = (XvAdaptorInfo *) Xmalloc(size)) == NULL) {
+ if ((pas = Xmalloc(size)) == NULL) {
Xfree(buffer);
UnlockDisplay(dpy);
SyncHandle();
@@ -237,7 +237,7 @@ XvQueryAdaptors(
size = u.pa->name_size;
u.buffer += (sz_xvAdaptorInfo + 3) & ~3;
- if ((name = (char *) Xmalloc(size + 1)) == NULL) {
+ if ((name = Xmalloc(size + 1)) == NULL) {
XvFreeAdaptorInfo(pas);
Xfree(buffer);
UnlockDisplay(dpy);
@@ -253,7 +253,7 @@ XvQueryAdaptors(
/* GET FORMATS */
size = pa->num_formats * sizeof(XvFormat);
- if ((pfs = (XvFormat *) Xmalloc(size)) == NULL) {
+ if ((pfs = Xmalloc(size)) == NULL) {
XvFreeAdaptorInfo(pas);
Xfree(buffer);
UnlockDisplay(dpy);
@@ -346,7 +346,7 @@ XvQueryEncodings(
}
size = rep.length << 2;
- if ((buffer = (char *) Xmalloc((unsigned) size)) == NULL) {
+ if ((buffer = Xmalloc(size)) == NULL) {
UnlockDisplay(dpy);
SyncHandle();
return (XvBadAlloc);
@@ -358,7 +358,7 @@ XvQueryEncodings(
/* GET ENCODINGS */
size = rep.num_encodings * sizeof(XvEncodingInfo);
- if ((pes = (XvEncodingInfo *) Xmalloc(size)) == NULL) {
+ if ((pes = Xmalloc(size)) == NULL) {
Xfree(buffer);
UnlockDisplay(dpy);
SyncHandle();
@@ -386,7 +386,7 @@ XvQueryEncodings(
size = u.pe->name_size;
u.buffer += (sz_xvEncodingInfo + 3) & ~3;
- if ((name = (char *) Xmalloc(size + 1)) == NULL) {
+ if ((name = Xmalloc(size + 1)) == NULL) {
XvFreeEncodingInfo(pes);
Xfree(buffer);
UnlockDisplay(dpy);