From 789d64e19a3b3d98b88bc80f677e0c37bfb5c631 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 May 2012 00:03:35 -0700 Subject: 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 Reviewed-by: Keith Packard Tested-by: Daniel Stone --- dbe/dbe.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'dbe') diff --git a/dbe/dbe.c b/dbe/dbe.c index ca7f3e278..d8010ffe1 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -132,7 +132,7 @@ ProcDbeGetVersion(ClientPtr client) swaps(&rep.sequenceNumber); } - WriteToClient(client, sizeof(xDbeGetVersionReply), (char *) &rep); + WriteToClient(client, sizeof(xDbeGetVersionReply), &rep); return Success; @@ -679,7 +679,7 @@ ProcDbeGetVisualInfo(ClientPtr client) } /* Send off reply. */ - WriteToClient(client, sizeof(xDbeGetVisualInfoReply), (char *) &rep); + WriteToClient(client, sizeof(xDbeGetVisualInfoReply), &rep); for (i = 0; i < count; i++) { CARD32 data32; @@ -693,7 +693,7 @@ ProcDbeGetVisualInfo(ClientPtr client) swapl(&data32); } - WriteToClient(client, sizeof(CARD32), (char *) &data32); + WriteToClient(client, sizeof(CARD32), &data32); /* Now send off visual info items. */ for (j = 0; j < pScrVisInfo[i].count; j++) { @@ -717,8 +717,7 @@ ProcDbeGetVisualInfo(ClientPtr client) } /* Write visualID(32), depth(8), perfLevel(8), and pad(16). */ - WriteToClient(client, 2 * sizeof(CARD32), - (char *) &visInfo.visualID); + WriteToClient(client, 2 * sizeof(CARD32), &visInfo.visualID); } } @@ -782,8 +781,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) swapl(&rep.attributes); } - WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), - (char *) &rep); + WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), &rep); return Success; } /* ProcDbeGetbackBufferAttributes() */ -- cgit v1.2.3