memcpy_speed: Use unsigned integers, overflows are undefined for signed integers
authorSebastian Dröge <sebastian@centricular.com>
Tue, 22 Apr 2014 16:05:17 +0000 (18:05 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 22 Apr 2014 16:05:17 +0000 (18:05 +0200)
testsuite/memcpy_speed.c

index 147cfe2..75df851 100644 (file)
@@ -20,7 +20,7 @@ int flush_cache = FALSE;
 void
 touch (unsigned char *ptr, int n)
 {
-  static int sum;
+  static unsigned int sum;
   int i;
   for(i=0;i<n;i++){
     sum += ptr[i];