Index: webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c |
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c |
index 9c42037b2e0c85c407c216f4549a6b27d7f900d6..6ee3df4db6ed5e7852441370edfc16d4733ab125 100644 |
--- a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c |
+++ b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_test.c |
@@ -52,6 +52,7 @@ int main(int argc, char* argv[]) |
int blockcount = 0; |
int packetlosscount = 0; |
int frameLen; |
+ size_t len_i16s; |
int16_t speechType; |
IlbcEncoderInstance *Enc_Inst; |
IlbcDecoderInstance *Dec_Inst; |
@@ -173,9 +174,8 @@ int main(int argc, char* argv[]) |
/* write byte file */ |
- if (fwrite(encoded_data, sizeof(int16_t), |
- ((len+1)/sizeof(int16_t)), efileid) != |
- (size_t)(((len+1)/sizeof(int16_t)))) { |
+ len_i16s = (len + 1) / sizeof(int16_t); |
+ if (fwrite(encoded_data, sizeof(int16_t), len_i16s, efileid) != len_i16s) { |
return -1; |
} |