summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-05-13 00:03:35 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:12:56 -0700
commit789d64e19a3b3d98b88bc80f677e0c37bfb5c631 (patch)
tree40f01917cef8f4b645bda7f95aa2c769225d2a4a /xfixes
parent329db3292223cccd4887062956622285c45a1523 (diff)
Remove unneccesary casts from WriteToClient calls
Casting return to (void) was used to tell lint that you intended to ignore the return value, so it didn't warn you about it. Casting the third argument to (char *) was used as the most generic pointer type in the days before compilers supported C89 (void *) (except for a couple places it's used for byte-sized pointer math). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/cursor.c6
-rw-r--r--xfixes/region.c2
-rw-r--r--xfixes/xfixes.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 467529a4f..79530f902 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -409,8 +409,8 @@ ProcXFixesGetCursorImage(ClientPtr client)
swapl(&rep->cursorSerial);
SwapLongs(image, npixels);
}
- WriteToClient(client, sizeof(xXFixesGetCursorImageReply) +
- (npixels << 2), (char *) rep);
+ WriteToClient(client,
+ sizeof(xXFixesGetCursorImageReply) + (npixels << 2), rep);
free(rep);
return Success;
}
@@ -565,7 +565,7 @@ ProcXFixesGetCursorImageAndName(ClientPtr client)
SwapLongs(image, npixels);
}
WriteToClient(client, sizeof(xXFixesGetCursorImageAndNameReply) +
- (npixels << 2) + nbytesRound, (char *) rep);
+ (npixels << 2) + nbytesRound, rep);
free(rep);
return Success;
}
diff --git a/xfixes/region.c b/xfixes/region.c
index 0acbadae2..89675e52d 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -584,7 +584,7 @@ ProcXFixesFetchRegion(ClientPtr client)
swaps(&reply->height);
SwapShorts((INT16 *) pRect, nBox * 4);
}
- (void) WriteToClient(client, sizeof(xXFixesFetchRegionReply) +
+ WriteToClient(client, sizeof(xXFixesFetchRegionReply) +
nBox * sizeof(xRectangle), (char *) reply);
free(reply);
return Success;
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index f80230fd3..54f84f41d 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -90,7 +90,7 @@ ProcXFixesQueryVersion(ClientPtr client)
swapl(&rep.majorVersion);
swapl(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xXFixesQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXFixesQueryVersionReply), &rep);
return Success;
}