Commit 917dc2d4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: avoid strndup() for debug messages

parent b195d6ef
......@@ -72,12 +72,8 @@ static xcb_connection_t *Connect (vlc_object_t *obj, const char *display)
const xcb_setup_t *setup = xcb_get_setup (conn);
msg_Dbg (obj, "connected to X%"PRIu16".%"PRIu16" server",
setup->protocol_major_version, setup->protocol_minor_version);
char *vendor = strndup (xcb_setup_vendor (setup), setup->vendor_len);
if (vendor)
{
msg_Dbg (obj, " vendor : %s", vendor);
free (vendor);
}
msg_Dbg (obj, " vendor : %.*s", (int)setup->vendor_len,
xcb_setup_vendor (setup));
msg_Dbg (obj, " version: %"PRIu32, setup->release_number);
return conn;
}
......
......@@ -428,7 +428,6 @@ static int Open (vlc_object_t *obj)
xcb_xv_adaptor_info_next (&it))
{
const xcb_xv_adaptor_info_t *a = it.data;
char *name;
adaptor_current++;
if (adaptor_selected != -1 && adaptor_selected != adaptor_current)
......@@ -466,12 +465,8 @@ static int Open (vlc_object_t *obj)
grabbed_port:
/* Found port - initialize selected format */
name = strndup (xcb_xv_adaptor_info_name (a), a->name_size);
if (name != NULL)
{
msg_Dbg (vd, "using adaptor %s", name);
free (name);
}
msg_Dbg (vd, "using adaptor %.*s", (int)a->name_size,
xcb_xv_adaptor_info_name (a));
msg_Dbg (vd, "using port %"PRIu32, p_sys->port);
msg_Dbg (vd, "using image format 0x%"PRIx32, p_sys->id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment