diff options
author | Arnaud Fontaine <arnau@debian.org> | 2009-12-16 19:55:24 +0100 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2010-11-14 20:22:29 +0900 |
commit | 4a09933a37bc7460858ef949da8b20a1b0ef79f6 (patch) | |
tree | 5dbf0489b7a56f446852ebc815a3c3414c52afb0 /ewmh | |
parent | 75b2d987ecd43940031c031252c3ac0e3cea15a1 (diff) |
xcb_ewmh_init_atoms: don't use VLA for wm_cm_sn declaration
Diffstat (limited to 'ewmh')
-rw-r--r-- | ewmh/ewmh.c.m4 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ewmh/ewmh.c.m4 b/ewmh/ewmh.c.m4 index 520d3a5..ad3a201 100644 --- a/ewmh/ewmh.c.m4 +++ b/ewmh/ewmh.c.m4 @@ -544,17 +544,18 @@ xcb_ewmh_init_atoms(xcb_connection_t *c, /* Then, send InternAtom requests for _NET_WM_CM_Sn and compute _NET_WM_CM_Sn according to the screen number 'n' */ - char wm_cm_sn[ewmh->nb_screens][32]; for(screen_nbr = 0; screen_nbr < ewmh->nb_screens; screen_nbr++) { - const int wm_cm_sn_len = snprintf(wm_cm_sn[screen_nbr], 32, - "_NET_WM_CM_S%d", screen_nbr); + char wm_cm_sn[32]; + + const int wm_cm_sn_len = snprintf(wm_cm_sn, 32, "_NET_WM_CM_S%d", + screen_nbr); assert(wm_cm_sn_len > 0 && wm_cm_sn_len < 32); ewmh_cookies[atom_nbr++] = xcb_intern_atom(ewmh->connection, 0, wm_cm_sn_len, - wm_cm_sn[screen_nbr]); + wm_cm_sn); } return ewmh_cookies; |