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 /dix/dispatch.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 'dix/dispatch.c')
-rw-r--r-- | dix/dispatch.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index bcce22fdb..4231cb0ac 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1035,7 +1035,7 @@ ProcGetAtomName(ClientPtr client) reply.sequenceNumber = client->sequence; reply.nameLength = len; WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); - (void) WriteToClient(client, len, str); + WriteToClient(client, len, str); return Success; } else { @@ -2143,8 +2143,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, BitsPerPixel(pDraw->depth), ClientOrder(client)); /* Don't split me, gcc pukes when you do */ - (void) WriteToClient(client, - (int) (nlines * widthBytesLine), pBuf); + WriteToClient(client, (int) (nlines * widthBytesLine), pBuf); } linesDone += nlines; } @@ -2179,9 +2178,8 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, 1, ClientOrder(client)); /* Don't split me, gcc pukes when you do */ - (void) WriteToClient(client, - (int) (nlines * widthBytesLine), - pBuf); + WriteToClient(client, (int) (nlines * widthBytesLine), + pBuf); } linesDone += nlines; } @@ -3250,8 +3248,7 @@ ProcGetFontPath(ClientPtr client) WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); if (stringLens || numpaths) - (void) WriteToClient(client, stringLens + numpaths, - (char *) bufferStart); + WriteToClient(client, stringLens + numpaths, bufferStart); return Success; } @@ -3523,8 +3520,8 @@ SendConnSetup(ClientPtr client, const char *reason) if (client->swapped) WriteSConnSetupPrefix(client, &csp); else - (void) WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); - (void) WriteToClient(client, (int) csp.lengthReason, reason); + WriteToClient(client, sz_xConnSetupPrefix, &csp); + WriteToClient(client, (int) csp.lengthReason, reason); return client->noClientException = -1; } @@ -3577,10 +3574,9 @@ SendConnSetup(ClientPtr client, const char *reason) lConnectionInfo); } else { - (void) WriteToClient(client, sizeof(xConnSetupPrefix), - (char *) lconnSetupPrefix); - (void) WriteToClient(client, (int) (lconnSetupPrefix->length << 2), - lConnectionInfo); + WriteToClient(client, sizeof(xConnSetupPrefix), lconnSetupPrefix); + WriteToClient(client, (int) (lconnSetupPrefix->length << 2), + lConnectionInfo); } client->clientState = ClientStateRunning; if (ClientStateCallback) { |