summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-06-26 17:06:17 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-06-26 17:06:17 +0000
commit7b84cf6fa63c40a4d0aa9373095e7021eaf708a8 (patch)
treefed62da6065b0ba8588fe15f5adcc22c8e0d638a /main
parent4f32bf72f97ad4151065fcb878c142eb7d284ba7 (diff)
Convert casts to unions, to fix alignment issues on Solaris
(closes issue #12932) Reported by: snuffy Patches: bug_12932_20080627.diff uploaded by snuffy (license 35) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/translate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/translate.c b/main/translate.c
index 9326f4880..4ee94d940 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -119,7 +119,7 @@ static void *newpvt(struct ast_translator *t)
ofs += sizeof(plc_state_t);
}
if (t->buf_size) /* finally buffer and header */
- pvt->outbuf = ofs + AST_FRIENDLY_OFFSET;
+ pvt->outbuf.c = ofs + AST_FRIENDLY_OFFSET;
/* call local init routine, if present */
if (t->newpvt && t->newpvt(pvt)) {
ast_free(pvt);
@@ -153,7 +153,7 @@ static void destroy(struct ast_trans_pvt *pvt)
/*! \brief framein wrapper, deals with plc and bound checks. */
static int framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
{
- int16_t *dst = (int16_t *)pvt->outbuf;
+ int16_t *dst = pvt->outbuf.i16;
int ret;
int samples = pvt->samples; /* initial value */
@@ -235,7 +235,7 @@ struct ast_frame *ast_trans_frameout(struct ast_trans_pvt *pvt,
f->mallocd = 0;
f->offset = AST_FRIENDLY_OFFSET;
f->src = pvt->t->name;
- f->data.ptr = pvt->outbuf;
+ f->data.ptr = pvt->outbuf.c;
ast_set_flag(f, AST_FRFLAG_FROM_TRANSLATOR);