mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
Add a common ARRAY_SIZE macro to dix.h
Does what it says on the box, replacing those from Xi/ and glx/. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
67953d6975
commit
854c1fa4a1
3 changed files with 2 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue