Received: from eggs.gnu.org ([208.118.235.92]:54937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvWcN-0000rC-6u for qemu-devel@nongnu.org; Wed, 16 Jan 2013 12:17:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvWcK-0004oj-GJ for qemu-devel@nongnu.org; Wed, 16 Jan 2013 12:17:39 -0500 From: Stefan Weil Date: Wed, 16 Jan 2013 18:17:33 +0100 Message-Id: <1358356653-16309-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] audio: Replace non-portable asprintf in debug code by g_strdup_printf List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: Stefan Weil , malc , qemu-devel@nongnu.org sw->name already uses the correct g_free to free the allocated memory. Signed-off-by: Stefan Weil --- audio/audio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) The patch preserves the special coding style used for audio code. Regards, Stefan diff --git a/audio/audio.c b/audio/audio.c index 1510b59..02bb886 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) { -- 1.7.10.4