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 --- record/record.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'record') diff --git a/record/record.c b/record/record.c index 8a38118cd..a3ee4dd3d 100644 --- a/record/record.c +++ b/record/record.c @@ -241,12 +241,12 @@ RecordFlushReplyBuffer(RecordContextPtr pContext, ++pContext->inFlush; if (pContext->numBufBytes) WriteToClient(pContext->pRecordingClient, pContext->numBufBytes, - (char *) pContext->replyBuffer); + pContext->replyBuffer); pContext->numBufBytes = 0; if (len1) - WriteToClient(pContext->pRecordingClient, len1, (char *) data1); + WriteToClient(pContext->pRecordingClient, len1, data1); if (len2) - WriteToClient(pContext->pRecordingClient, len2, (char *) data2); + WriteToClient(pContext->pRecordingClient, len2, data2); --pContext->inFlush; } /* RecordFlushReplyBuffer */ @@ -1829,8 +1829,7 @@ ProcRecordQueryVersion(ClientPtr client) swaps(&rep.majorVersion); swaps(&rep.minorVersion); } - (void) WriteToClient(client, sizeof(xRecordQueryVersionReply), - (char *) &rep); + WriteToClient(client, sizeof(xRecordQueryVersionReply), &rep); return Success; } /* ProcRecordQueryVersion */ @@ -2240,7 +2239,7 @@ ProcRecordGetContext(ClientPtr client) swapl(&rep.length); swapl(&rep.nClients); } - (void) WriteToClient(client, sizeof(xRecordGetContextReply), (char *) &rep); + WriteToClient(client, sizeof(xRecordGetContextReply), &rep); /* write all the CLIENT_INFOs */ @@ -2257,9 +2256,9 @@ ProcRecordGetContext(ClientPtr client) rci.clientResource = pRCAP->pClientIDs[i]; if (client->swapped) swapl(&rci.clientResource); - WriteToClient(client, sizeof(xRecordClientInfo), (char *) &rci); + WriteToClient(client, sizeof(xRecordClientInfo), &rci); WriteToClient(client, sizeof(xRecordRange) * pri->nRanges, - (char *) pri->pRanges); + pri->pRanges); } } err = Success; -- cgit v1.2.3