From 4d3d97fd4f42fe7cb46d457f479080a2be5c7dc7 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 28 Apr 2008 08:35:29 +0200 Subject: [PATCH] [xutil] Use a_strndup() Signed-off-by: Julien Danjou --- common/xutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/xutil.c b/common/xutil.c index ee2c29e4f..6e613c3fb 100644 --- a/common/xutil.c +++ b/common/xutil.c @@ -19,7 +19,7 @@ * */ -/* strndup(), asprintf() */ +/* asprintf() */ #define _GNU_SOURCE #include @@ -217,8 +217,8 @@ xutil_get_class_hint(xcb_connection_t *conn, xcb_window_t win) len_name = a_strlen(data); len_class = a_strlen(data + len_name + 1); - ch->res_name = strndup(data, len_name); - ch->res_class = strndup(data + len_name + 1, len_class); + ch->res_name = a_strndup(data, len_name); + ch->res_class = a_strndup(data + len_name + 1, len_class); p_delete(&class_hint_r);