aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-01-16 18:17:33 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-01-16 12:03:26 -0600
commit457b65432700281b061086a2a8527bf1f59163a9 (patch)
treed4ece3fe5109b0bb699fe15b86684ce1a30f886d /audio
parenta1cbfd554e11bb8af38c2f3e1f1574bf4c563cd2 (diff)
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>
Diffstat (limited to 'audio')
-rw-r--r--audio/audio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 1510b598a6..02bb8861f8 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -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_head, sc, entries);
#ifdef DEBUG_CAPTURE
- asprintf (&sw->name, "for %p %d,%d,%d",
- hw, sw->info.freq, sw->info.bits, sw->info.nchannels);
+ sw->name = g_strdup_printf ("for %p %d,%d,%d",
+ hw, sw->info.freq, sw->info.bits,
+ sw->info.nchannels);
dolog ("Added %s active = %d\n", sw->name, sw->active);
#endif
if (sw->active) {