[svn-commits] kpfleming: branch 1.4 r107472 - /branches/1.4/apps/app_rpt.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Mar 11 10:18:46 CDT 2008
Author: kpfleming
Date: Tue Mar 11 10:18:45 2008
New Revision: 107472
URL: http://svn.digium.com/view/asterisk?view=rev&rev=107472
Log:
backport a fix from trunk
Modified:
branches/1.4/apps/app_rpt.c
Modified: branches/1.4/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_rpt.c?view=diff&rev=107472&r1=107471&r2=107472
==============================================================================
--- branches/1.4/apps/app_rpt.c (original)
+++ branches/1.4/apps/app_rpt.c Tue Mar 11 10:18:45 2008
@@ -1646,12 +1646,8 @@
memset(&rpt_vars[n].p,0,sizeof(rpt_vars[n].p));
if (init)
{
- char *cp;
- int savearea = (char *)&rpt_vars[n].p - (char *)&rpt_vars[n];
-
- cp = (char *) &rpt_vars[n].p;
- memset(cp + sizeof(rpt_vars[n].p),0,
- sizeof(rpt_vars[n]) - (sizeof(rpt_vars[n].p) + savearea));
+ /* clear all the fields in the structure after 'p' */
+ memset(&rpt_vars[n].p + sizeof(rpt_vars[0].p), 0, sizeof(rpt_vars[0]) - sizeof(rpt_vars[0].p) - offsetof(typeof(rpt_vars[0]), p));
rpt_vars[n].tele.next = &rpt_vars[n].tele;
rpt_vars[n].tele.prev = &rpt_vars[n].tele;
rpt_vars[n].rpt_thread = AST_PTHREADT_NULL;
More information about the svn-commits
mailing list