aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/io.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2016-07-04 00:21:45 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-05 13:32:04 +0200
commitff81a52695821704a3eb33e8de8bb7fe55bccfe1 (patch)
tree9715fe1b573e890469e6f79828084eee261653a8 /nx-X11/programs/Xserver/os/io.c
parent06a97857a0380f88b691ac022fa30a05d54e43e0 (diff)
downloadnx-libs-ff81a52695821704a3eb33e8de8bb7fe55bccfe1.tar.gz
nx-libs-ff81a52695821704a3eb33e8de8bb7fe55bccfe1.tar.bz2
nx-libs-ff81a52695821704a3eb33e8de8bb7fe55bccfe1.zip
Make WriteToClient take a const void * like any decent IO write function.
Enough with the casting. Doesn't break API or even ABI, but does make a lot of silly casts superfluos.
Diffstat (limited to 'nx-X11/programs/Xserver/os/io.c')
-rw-r--r--nx-X11/programs/Xserver/os/io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index 4d12c6e89..470d1bec2 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -857,11 +857,12 @@ SetCriticalOutputPending(void)
*****************/
int
-WriteToClient (ClientPtr who, int count, char *buf)
+WriteToClient (ClientPtr who, int count, const void *__buf)
{
OsCommPtr oc;
ConnectionOutputPtr oco;
int padBytes;
+ const char *buf = __buf;
#ifdef DEBUG_COMMUNICATION
Bool multicount = FALSE;
#endif
@@ -999,13 +1000,14 @@ WriteToClient (ClientPtr who, int count, char *buf)
**********************/
int
-FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
+FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
{
ConnectionOutputPtr oco = oc->output;
int connection = oc->fd;
XtransConnInfo trans_conn = oc->trans_conn;
struct iovec iov[3];
static char padBuffer[3];
+ const char *extraBuf = __extraBuf;
long written;
long padsize;
long notWritten;
@@ -1051,7 +1053,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
}
InsertIOV ((char *)oco->buf, oco->count)
- InsertIOV (extraBuf, extraCount)
+ InsertIOV ((char *)extraBuf, extraCount)
InsertIOV (padBuffer, padsize)
errno = 0;