[svn-commits] mattf: branch mattf/zaptel-1.4-stackcleanup r4150 - /team/mattf/zaptel-1.4-st...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Apr 5 15:09:13 CDT 2008


Author: mattf
Date: Sat Apr  5 15:09:13 2008
New Revision: 4150

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4150
Log:
Do some additional small stack optimizations

Modified:
    team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c

Modified: team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c?view=diff&rev=4150&r1=4149&r2=4150
==============================================================================
--- team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c (original)
+++ team/mattf/zaptel-1.4-stackcleanup/kernel/zaptel-base.c Sat Apr  5 15:09:13 2008
@@ -4650,7 +4650,6 @@
 	int oldconf;
 	void *rxgain=NULL;
 	struct echo_can_state *ec;
-	struct zt_echocanparams ecp;
 
 	if (!chan)
 		return -ENOSYS;
@@ -4814,6 +4813,9 @@
 		}
 		break;
 	case ZT_ECHOCANCEL_PARAMS:
+	{
+		struct zt_echocanparams ecp;
+
 		if (!(chan->flags & ZT_FLAG_AUDIO))
 			return -EINVAL;
 		if (copy_from_user(&ecp, (struct zt_echocanparams *) data, sizeof(ecp)))
@@ -4822,7 +4824,11 @@
 		if ((ret = ioctl_echocancel(chan, &ecp, (void *) data)))
 			return ret;
 		break;
+	}
 	case ZT_ECHOCANCEL:
+	{
+		struct zt_echocanparams ecp;
+
 		if (!(chan->flags & ZT_FLAG_AUDIO))
 			return -EINVAL;
 		get_user(j, (int *) data);
@@ -4831,6 +4837,7 @@
 		if ((ret = ioctl_echocancel(chan, &ecp, NULL)))
 			return ret;
 		break;
+	}
 	case ZT_ECHOTRAIN:
 		get_user(j, (int *)data); /* get pre-training time from user */
 		if ((j < 0) || (j >= ZT_MAX_PRETRAINING))




More information about the svn-commits mailing list