audio: Replace non-portable asprintf in debug code by g_strdup_printf
sw->name already uses the correct g_free to free the allocated memory. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a1cbfd554e
commit
457b654327
@ -828,8 +828,9 @@ static int audio_attach_capture (HWVoiceOut *hw)
|
|||||||
QLIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries);
|
QLIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries);
|
||||||
QLIST_INSERT_HEAD (&hw->cap_head, sc, entries);
|
QLIST_INSERT_HEAD (&hw->cap_head, sc, entries);
|
||||||
#ifdef DEBUG_CAPTURE
|
#ifdef DEBUG_CAPTURE
|
||||||
asprintf (&sw->name, "for %p %d,%d,%d",
|
sw->name = g_strdup_printf ("for %p %d,%d,%d",
|
||||||
hw, sw->info.freq, sw->info.bits, sw->info.nchannels);
|
hw, sw->info.freq, sw->info.bits,
|
||||||
|
sw->info.nchannels);
|
||||||
dolog ("Added %s active = %d\n", sw->name, sw->active);
|
dolog ("Added %s active = %d\n", sw->name, sw->active);
|
||||||
#endif
|
#endif
|
||||||
if (sw->active) {
|
if (sw->active) {
|
||||||
|
Loading…
Reference in New Issue
Block a user