Index: webrtc/modules/audio_coding/codecs/g722/g722_decode.c |
diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c |
index 8fdeec162b3424900c1637d2db93c584c10592e4..952a7d037f61a5e0a2cdc1d01bf4229ff1c0ff3e 100644 |
--- a/webrtc/modules/audio_coding/codecs/g722/g722_decode.c |
+++ b/webrtc/modules/audio_coding/codecs/g722/g722_decode.c |
@@ -157,11 +157,7 @@ static void block4(G722DecoderState *s, int band, int d) |
G722DecoderState* WebRtc_g722_decode_init(G722DecoderState* s, |
int rate, |
int options) { |
- if (s == NULL) |
- { |
- if ((s = (G722DecoderState *) malloc(sizeof(*s))) == NULL) |
- return NULL; |
- } |
+ s = s ? s : malloc(sizeof(*s)); |
memset(s, 0, sizeof(*s)); |
if (rate == 48000) |
s->bits_per_sample = 6; |