compositor-x11: Use ARRAY_LENGTH macro from wayland-util.h
diff --git a/compositor/compositor-x11.c b/compositor/compositor-x11.c
index a18d537..5aa1ebf 100644
--- a/compositor/compositor-x11.c
+++ b/compositor/compositor-x11.c
@@ -44,8 +44,6 @@
 
 #include "compositor.h"
 
-#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
-
 struct x11_compositor {
 	struct wlsc_compositor	 base;
 
@@ -244,7 +242,7 @@
 			     c->atom.wm_protocols,
 			     XCB_ATOM_ATOM,
 			     32,
-			     ARRAY_SIZE(list),
+			     ARRAY_LENGTH(list),
 			     list);
 }
 
@@ -700,19 +698,19 @@
 		{ "CARDINAL",		F(atom.cardinal) },
 	};
 
-	xcb_intern_atom_cookie_t cookies[ARRAY_SIZE(atoms)];
+	xcb_intern_atom_cookie_t cookies[ARRAY_LENGTH(atoms)];
 	xcb_intern_atom_reply_t *reply;
 	xcb_pixmap_t pixmap;
 	xcb_gc_t gc;
 	int i;
 	uint8_t data[] = { 0, 0, 0, 0 };
 
-	for (i = 0; i < ARRAY_SIZE(atoms); i++)
+	for (i = 0; i < ARRAY_LENGTH(atoms); i++)
 		cookies[i] = xcb_intern_atom (c->conn, 0,
 					      strlen(atoms[i].name),
 					      atoms[i].name);
 
-	for (i = 0; i < ARRAY_SIZE(atoms); i++) {
+	for (i = 0; i < ARRAY_LENGTH(atoms); i++) {
 		reply = xcb_intern_atom_reply (c->conn, cookies[i], NULL);
 		*(xcb_atom_t *) ((char *) c + atoms[i].offset) = reply->atom;
 		free(reply);