aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include/dix.h
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/include/dix.h')
-rw-r--r--xorg-server/include/dix.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h
index 3d8b0e575..74123b51b 100644
--- a/xorg-server/include/dix.h
+++ b/xorg-server/include/dix.h
@@ -64,6 +64,8 @@ SOFTWARE.
#define REQUEST(type) \
type *stuff = (type *)client->requestBuffer
+#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
+
#define REQUEST_SIZE_MATCH(req)\
if ((sizeof(req) >> 2) != client->req_len)\
return(BadLength)
@@ -102,12 +104,12 @@ SOFTWARE.
if ((pClient)->swapped) \
(*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
(pClient, (int)(size), pReply); \
- else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); }
+ else WriteToClient(pClient, (int)(size), (pReply)); }
#define WriteSwappedDataToClient(pClient, size, pbuf) \
if ((pClient)->swapped) \
(*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
- else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf));
+ else WriteToClient(pClient, (int)(size), (pbuf));
typedef struct _TimeStamp *TimeStampPtr;