[xutil] Use a_strndup()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-28 08:35:29 +02:00
parent 5447001254
commit 4d3d97fd4f
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@
* *
*/ */
/* strndup(), asprintf() */ /* asprintf() */
#define _GNU_SOURCE #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
@ -217,8 +217,8 @@ xutil_get_class_hint(xcb_connection_t *conn, xcb_window_t win)
len_name = a_strlen(data); len_name = a_strlen(data);
len_class = a_strlen(data + len_name + 1); len_class = a_strlen(data + len_name + 1);
ch->res_name = strndup(data, len_name); ch->res_name = a_strndup(data, len_name);
ch->res_class = strndup(data + len_name + 1, len_class); ch->res_class = a_strndup(data + len_name + 1, len_class);
p_delete(&class_hint_r); p_delete(&class_hint_r);