diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-05-13 00:03:35 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-09 19:12:56 -0700 |
commit | 789d64e19a3b3d98b88bc80f677e0c37bfb5c631 (patch) | |
tree | 40f01917cef8f4b645bda7f95aa2c769225d2a4a /Xext/xres.c | |
parent | 329db3292223cccd4887062956622285c45a1523 (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 'Xext/xres.c')
-rw-r--r-- | Xext/xres.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Xext/xres.c b/Xext/xres.c index dbefeebdb..d207dceb0 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -209,7 +209,7 @@ ProcXResQueryVersion(ClientPtr client) swaps(&rep.server_major); swaps(&rep.server_minor); } - WriteToClient(client, sizeof(xXResQueryVersionReply), (char *) &rep); + WriteToClient(client, sizeof(xXResQueryVersionReply), &rep); return Success; } @@ -242,7 +242,7 @@ ProcXResQueryClients(ClientPtr client) swapl(&rep.length); swapl(&rep.num_clients); } - WriteToClient(client, sizeof(xXResQueryClientsReply), (char *) &rep); + WriteToClient(client, sizeof(xXResQueryClientsReply), &rep); if (num_clients) { xXResClient scratch; @@ -255,7 +255,7 @@ ProcXResQueryClients(ClientPtr client) swapl(&scratch.resource_base); swapl(&scratch.resource_mask); } - WriteToClient(client, sz_xXResClient, (char *) &scratch); + WriteToClient(client, sz_xXResClient, &scratch); } } @@ -310,8 +310,7 @@ ProcXResQueryClientResources(ClientPtr client) swapl(&rep.num_types); } - WriteToClient(client, sizeof(xXResQueryClientResourcesReply), - (char *) &rep); + WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep); if (num_types) { xXResType scratch; @@ -337,7 +336,7 @@ ProcXResQueryClientResources(ClientPtr client) swapl(&scratch.resource_type); swapl(&scratch.count); } - WriteToClient(client, sz_xXResType, (char *) &scratch); + WriteToClient(client, sz_xXResType, &scratch); } } @@ -486,8 +485,7 @@ ProcXResQueryClientPixmapBytes(ClientPtr client) swapl(&rep.bytes); swapl(&rep.bytes_overflow); } - WriteToClient(client, sizeof(xXResQueryClientPixmapBytesReply), - (char *) &rep); + WriteToClient(client, sizeof(xXResQueryClientPixmapBytesReply), &rep); return Success; } @@ -679,7 +677,7 @@ ProcXResQueryClientIds (ClientPtr client) swapl (&rep.numIds); } - WriteToClient(client,sizeof(rep),(char*)&rep); + WriteToClient(client, sizeof(rep), &rep); WriteFragmentsToClient(client, &ctx.response); } @@ -1061,7 +1059,7 @@ ProcXResQueryResourceBytes (ClientPtr client) SwapXResQueryResourceBytes(&ctx.response); } - WriteToClient(client,sizeof(rep),(char*)&rep); + WriteToClient(client, sizeof(rep), &rep); WriteFragmentsToClient(client, &ctx.response); } |