diff options
Diffstat (limited to 'codecs/codec_gsm.c')
-rw-r--r-- | codecs/codec_gsm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c index c7b0b100c..a23306e57 100644 --- a/codecs/codec_gsm.c +++ b/codecs/codec_gsm.c @@ -68,13 +68,11 @@ struct gsm_translator_pvt { /* both gsm2lin and lin2gsm */ int16_t buf[BUFFER_SAMPLES]; /* lin2gsm, temporary storage */ }; -static void *gsm_new(struct ast_trans_pvt *pvt) +static int gsm_new(struct ast_trans_pvt *pvt) { struct gsm_translator_pvt *tmp = pvt->pvt; - if (!(tmp->gsm = gsm_create())) - return NULL; - return tmp; + return (tmp->gsm = gsm_create()) ? 0 : -1; } static struct ast_frame *lintogsm_sample(void) |