From 677e6355c55b2c92c3295185ee2932c59ff24843 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 10 Jul 2008 15:08:07 +0200 Subject: [PATCH] systray: use snprintf() result, not strlen Signed-off-by: Julien Danjou --- systray.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/systray.c b/systray.c index 72d129ae..fd205a6f 100644 --- a/systray.c +++ b/systray.c @@ -41,11 +41,11 @@ systray_init(int phys_screen) xcb_intern_atom_cookie_t atom_systray_q; xcb_intern_atom_reply_t *atom_systray_r; xcb_atom_t atom_systray; + ssize_t len; /* Send requests */ - snprintf(atom_name, sizeof(atom_name), "_NET_SYSTEM_TRAY_S%d", phys_screen); - atom_systray_q = xcb_intern_atom_unchecked(globalconf.connection, false, - a_strlen(atom_name), atom_name); + len = snprintf(atom_name, sizeof(atom_name), "_NET_SYSTEM_TRAY_S%d", phys_screen); + atom_systray_q = xcb_intern_atom_unchecked(globalconf.connection, false, len, atom_name); globalconf.screens[phys_screen].systray.window = xcb_generate_id(globalconf.connection); xcb_create_window(globalconf.connection, xscreen->root_depth,