[asterisk-commits] kpfleming: trunk r83986 - in /trunk: ./ channels/chan_alsa.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 26 19:08:47 CDT 2007


Author: kpfleming
Date: Wed Sep 26 19:08:47 2007
New Revision: 83986

URL: http://svn.digium.com/view/asterisk?view=rev&rev=83986
Log:
Merged revisions 83974 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83974 | kpfleming | 2007-09-26 16:53:03 -0700 (Wed, 26 Sep 2007) | 2 lines

avoid the weird usage of assert() in the ALSA header files that gcc 4.2 wants to complain about

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_alsa.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_alsa.c?view=diff&rev=83986&r1=83985&r2=83986
==============================================================================
--- trunk/channels/chan_alsa.c (original)
+++ trunk/channels/chan_alsa.c Wed Sep 26 19:08:47 2007
@@ -368,7 +368,8 @@
 		ast_debug(1, "Opening device %s in %s mode\n", dev, (stream == SND_PCM_STREAM_CAPTURE) ? "read" : "write");
 	}
 
-	snd_pcm_hw_params_alloca(&hwparams);
+	hwparams = alloca(snd_pcm_hw_params_sizeof());
+	memset(hwparams, 0, snd_pcm_hw_params_sizeof());
 	snd_pcm_hw_params_any(handle, hwparams);
 
 	err = snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
@@ -419,7 +420,8 @@
 	if (err < 0)
 		ast_log(LOG_ERROR, "Couldn't set the new hw params: %s\n", snd_strerror(err));
 
-	snd_pcm_sw_params_alloca(&swparams);
+	swparams = alloca(snd_pcm_sw_params_sizeof());
+	memset(swparams, 0, snd_pcm_sw_params_sizeof());
 	snd_pcm_sw_params_current(handle, swparams);
 
 #if 1




More information about the asterisk-commits mailing list