Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: webrtc/common_audio/signal_processing/dot_product_with_scale.c

Issue 1174813003: Prepare to convert various types to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments + resync Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/common_audio/signal_processing/dot_product_with_scale.c
diff --git a/webrtc/common_audio/signal_processing/dot_product_with_scale.c b/webrtc/common_audio/signal_processing/dot_product_with_scale.c
index 389bcf0578f7895520335835e86d9820e4370340..c01ec57309ec32809e0e3305ebc40246e2a9766c 100644
--- a/webrtc/common_audio/signal_processing/dot_product_with_scale.c
+++ b/webrtc/common_audio/signal_processing/dot_product_with_scale.c
@@ -18,7 +18,7 @@ int32_t WebRtcSpl_DotProductWithScale(const int16_t* vector1,
int i = 0;
/* Unroll the loop to improve performance. */
- for (i = 0; i < length - 3; i += 4) {
+ for (i = 0; i + 3 < length; i += 4) {
sum += (vector1[i + 0] * vector2[i + 0]) >> scaling;
sum += (vector1[i + 1] * vector2[i + 1]) >> scaling;
sum += (vector1[i + 2] * vector2[i + 2]) >> scaling;
« no previous file with comments | « webrtc/common_audio/signal_processing/auto_correlation.c ('k') | webrtc/common_audio/signal_processing/levinson_durbin.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698