diff options
author | Philip Jägenstedt <philip@foolip.org> | 2012-10-11 13:27:12 +0400 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2012-10-11 17:21:44 +0400 |
commit | b7b5872c9d6be8daefc79f12c23e6c7fa319deab (patch) | |
tree | 84df6abbfec6eb8c9d4f80f2d231e9954a310025 /silk/enc_API.c | |
parent | 96480adaff14041dcf3c90167999088fea7c4f65 (diff) |
Fix minor issues reported by scan-build
Diffstat (limited to 'silk/enc_API.c')
-rw-r--r-- | silk/enc_API.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/silk/enc_API.c b/silk/enc_API.c index ec7915ce..325e16ad 100644 --- a/silk/enc_API.c +++ b/silk/enc_API.c @@ -191,9 +191,8 @@ opus_int silk_Encode( /* O Returns error co if( prefillFlag ) { /* Only accept input length of 10 ms */ if( nBlocksOf10ms != 1 ) { - ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; silk_assert( 0 ); - return ret; + return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; } /* Reset Encoder */ for( n = 0; n < encControl->nChannelsInternal; n++ ) { @@ -212,15 +211,13 @@ opus_int silk_Encode( /* O Returns error co } else { /* Only accept input lengths that are a multiple of 10 ms */ if( nBlocksOf10ms * encControl->API_sampleRate != 100 * nSamplesIn || nSamplesIn < 0 ) { - ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; silk_assert( 0 ); - return ret; + return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; } /* Make sure no more than one packet can be produced */ if( 1000 * (opus_int32)nSamplesIn > encControl->payloadSize_ms * encControl->API_sampleRate ) { - ret = SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; silk_assert( 0 ); - return ret; + return SILK_ENC_INPUT_INVALID_NO_OF_SAMPLES; } } |