[zaptel-commits] kpfleming: branch kpfleming/dtmf-twister r3481 - /team/kpfleming/dtmf-twister/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Fri Dec 14 11:16:35 CST 2007


Author: kpfleming
Date: Fri Dec 14 11:16:34 2007
New Revision: 3481

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3481
Log:
avoid hardcoding array size

Modified:
    team/kpfleming/dtmf-twister/zaptel-base.c

Modified: team/kpfleming/dtmf-twister/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/team/kpfleming/dtmf-twister/zaptel-base.c?view=diff&rev=3481&r1=3480&r2=3481
==============================================================================
--- team/kpfleming/dtmf-twister/zaptel-base.c (original)
+++ team/kpfleming/dtmf-twister/zaptel-base.c Fri Dec 14 11:16:34 2007
@@ -3598,10 +3598,10 @@
 			if (!z)
 				continue;
 
-			for (i = 0; i < 16; i++)
+			for (i = 0; i < sizeof(z->dtmf) / sizeof(z->dtmf[0]); i++)
 				z->dtmf[i].tonesamples = tdp.dtmf_tonelen * ZT_CHUNKSIZE;
 
-			for (i = 0; i < 15; i++)
+			for (i = 0; i < sizeof(z->mf) / sizeof(z->mf[0]); i++)
 				z->mf[i].tonesamples = tdp.mfv1_tonelen * ZT_CHUNKSIZE;
 
 			/* Special case for K/P tone */




More information about the zaptel-commits mailing list