systray: use snprintf() result, not strlen

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-07-10 15:08:07 +02:00
parent 750040be68
commit 677e6355c5
1 changed files with 3 additions and 3 deletions

View File

@ -41,11 +41,11 @@ systray_init(int phys_screen)
xcb_intern_atom_cookie_t atom_systray_q; xcb_intern_atom_cookie_t atom_systray_q;
xcb_intern_atom_reply_t *atom_systray_r; xcb_intern_atom_reply_t *atom_systray_r;
xcb_atom_t atom_systray; xcb_atom_t atom_systray;
ssize_t len;
/* Send requests */ /* Send requests */
snprintf(atom_name, sizeof(atom_name), "_NET_SYSTEM_TRAY_S%d", phys_screen); len = snprintf(atom_name, sizeof(atom_name), "_NET_SYSTEM_TRAY_S%d", phys_screen);
atom_systray_q = xcb_intern_atom_unchecked(globalconf.connection, false, atom_systray_q = xcb_intern_atom_unchecked(globalconf.connection, false, len, atom_name);
a_strlen(atom_name), atom_name);
globalconf.screens[phys_screen].systray.window = xcb_generate_id(globalconf.connection); globalconf.screens[phys_screen].systray.window = xcb_generate_id(globalconf.connection);
xcb_create_window(globalconf.connection, xscreen->root_depth, xcb_create_window(globalconf.connection, xscreen->root_depth,