diff --git a/os/io.c b/os/io.c index 476435c3df..7f22d71a74 100644 --- a/os/io.c +++ b/os/io.c @@ -916,7 +916,7 @@ FlushClient(ClientPtr who, OsCommPtr oc) size_t todo = notWritten; /* trying to write that much this time */ while (notWritten) { errno = 0; - size_t len = _XSERVTransWrite(trans_conn, (const char*)oco->buf + written, todo); + ssize_t len = _XSERVTransWrite(trans_conn, ((const char*)oco->buf) + written, todo); if (len >= 0) { written += len; notWritten -= len;