diff --git a/src/xcl/io.c b/src/xcl/io.c index c7791c72..eaf61711 100644 --- a/src/xcl/io.c +++ b/src/xcl/io.c @@ -333,7 +333,7 @@ int _XRead(Display *dpy, char *data, long size) void _XReadPad(Display *dpy, char *data, long size) { _XRead(dpy, data, size); - dpy->xcl->reply_consumed += XCL_PAD(size); + dpy->xcl->reply_consumed += -size & 3; _XFreeReplyData(dpy, False); } diff --git a/src/xcl/xcblock.c b/src/xcl/xcblock.c index ea1a3751..7f15a8ea 100644 --- a/src/xcl/xcblock.c +++ b/src/xcl/xcblock.c @@ -145,7 +145,7 @@ static void _XBeforeFlush(Display *dpy, struct iovec *iov) for (ext = dpy->flushes; ext; ext = ext->next_flush) { ext->before_flush(dpy, &ext->codes, iov->iov_base, iov->iov_len); if((iov->iov_len & 3) != 0) - ext->before_flush(dpy, &ext->codes, pad, XCL_PAD(iov->iov_len)); + ext->before_flush(dpy, &ext->codes, pad, -iov->iov_len & 3); } } diff --git a/src/xclint.h b/src/xclint.h index 638b9a6d..1c4d3b6a 100644 --- a/src/xclint.h +++ b/src/xclint.h @@ -7,8 +7,6 @@ #include #include -#define XCL_PAD(i) ((4 - (i & 3)) & 3) - #define assert_sequence_less(a,b) assert((b) - (a) < 65536) typedef struct PendingRequest PendingRequest;