Merged revisions 107466 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

................
r107466 | kpfleming | 2008-03-11 10:13:38 -0500 (Tue, 11 Mar 2008) | 10 lines

Merged revisions 107464 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines

fix various other problems found by gcc 4.3

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-03-11 15:13:54 +00:00
parent 07e93e4598
commit 19ca2892c0
4 changed files with 13 additions and 15 deletions

View File

@@ -888,12 +888,8 @@ static void load_rpt_vars(int n, int init)
ast_free(rpt_vars[n].p.tailmsgbuf);
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;