diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-02 00:58:43 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-02 00:58:43 +0000 |
commit | 3b31fc37af23c0e21791a6c9b813a3aa7a10072b (patch) | |
tree | f28aa4e6b7b5ea3cb18081165df37c7bd0ef9c16 /main/frame.c | |
parent | b6affabc9ef8c64b3f5a542507f2df2f71e9625a (diff) |
Merged revisions 160208 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r160208 | tilghman | 2008-12-01 18:37:21 -0600 (Mon, 01 Dec 2008) | 10 lines
Merged revisions 160207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r160207 | tilghman | 2008-12-01 18:25:16 -0600 (Mon, 01 Dec 2008) | 3 lines
Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
and glibc.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@160234 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/frame.c')
-rw-r--r-- | main/frame.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/frame.c b/main/frame.c index 35bb47fff..8c0982b8c 100644 --- a/main/frame.c +++ b/main/frame.c @@ -478,9 +478,12 @@ struct ast_frame *ast_frdup(const struct ast_frame *f) memcpy(out->data.ptr, f->data.ptr, out->datalen); } if (srclen > 0) { + /* This may seem a little strange, but it's to avoid a gcc (4.2.4) compiler warning */ + char *src; out->src = buf + sizeof(*out) + AST_FRIENDLY_OFFSET + f->datalen; + src = (char *) out->src; /* Must have space since we allocated for it */ - strcpy((char *)out->src, f->src); + strcpy(src, f->src); } ast_copy_flags(out, f, AST_FRFLAG_HAS_TIMING_INFO); out->ts = f->ts; |