summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2009-12-12 17:03:07 +0100
committerArnaud Fontaine <arnau@debian.org>2010-08-09 16:06:30 -0500
commit2163d90d014c6c1121092799a4ae7f5a1b515688 (patch)
treed1ed9a3877e1bbcf5e24da0519dc42b6f1a02e3e
parentd776aa8fa48bcbe46ac926475d1d481e8b85feff (diff)
Use countof when possible
-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)