summaryrefslogtreecommitdiff
path: root/ewmh
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2009-12-12 17:03:07 +0100
committerArnaud Fontaine <arnau@debian.org>2010-11-14 20:22:28 +0900
commit6d0804c3abf3f4ae5c4ebe9f3a5884f3a4234497 (patch)
tree79ba82d6e2566454245065e851cf80012c48e91e /ewmh
parent9ef2902ca3dd745e92336d5721442d015bb1ba22 (diff)
Use countof when possible
Diffstat (limited to 'ewmh')
-rw-r--r--ewmh/ewmh.c.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/ewmh/ewmh.c.m4 b/ewmh/ewmh.c.m4
index bbc75e7..72437fa 100644
--- a/ewmh/ewmh.c.m4
+++ b/ewmh/ewmh.c.m4
@@ -1003,7 +1003,7 @@ xcb_ewmh_set_wm_icon_geometry_checked(xcb_ewmh_connection_t *ewmh,
return xcb_change_property_checked(ewmh->connection, XCB_PROP_MODE_REPLACE,
window, ewmh->_NET_WM_ICON_GEOMETRY,
- CARDINAL, 32, 4, data);
+ CARDINAL, 32, countof(data), data);
}
xcb_void_cookie_t
@@ -1015,7 +1015,8 @@ xcb_ewmh_set_wm_icon_geometry(xcb_ewmh_connection_t *ewmh,
const uint32_t data[] = { left, right, top, bottom };
return xcb_change_property(ewmh->connection, XCB_PROP_MODE_REPLACE, window,
- ewmh->_NET_WM_ICON_GEOMETRY, CARDINAL, 32, 4, data);
+ ewmh->_NET_WM_ICON_GEOMETRY, CARDINAL, 32,
+ countof(data), data);
}
DO_GET_PROPERTY(wm_icon_geometry, _NET_WM_ICON_GEOMETRY, CARDINAL, 4)