summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-12 16:49:33 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-12 17:03:10 -0800
commitaf4113bfeb1d155f5f037c3492e50513336fa4a7 (patch)
treef62b95fd945a52ee4653edd1af897b3b252af6ea
parent2c9800f91559fbb12dd276cf0536631104092f67 (diff)
WriteToClient: preserve constness of buf while extracting length value
Fixes gcc warning: io.c: In function 'WriteToClient': io.c:826:6: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--os/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/io.c b/os/io.c
index 955bf8b73..ebb821653 100644
--- a/os/io.c
+++ b/os/io.c
@@ -823,7 +823,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
CARD32 replylen;
unsigned long bytesleft;
- replylen = ((xGenericReply *)buf)->length;
+ replylen = ((const xGenericReply *)buf)->length;
if (who->swapped)
swapl(&replylen);
bytesleft = (replylen * 4) + SIZEOF(xReply) - count - padBytes;