about summary refs log tree commit diff
path: root/benchtests/bench-memmove-walk.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2018-05-07 20:54:31 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2018-05-07 20:54:31 +0530
commit543477f78b9163dc1d74596c726043d7611a8740 (patch)
treec9b62e33a885fbc8c953804395c878eb1c58ac96 /benchtests/bench-memmove-walk.c
parentffa81c22a3ac0fb75ad9bf2b1c3cdbf9eafa0bc9 (diff)
downloadglibc-543477f78b9163dc1d74596c726043d7611a8740.tar.gz
glibc-543477f78b9163dc1d74596c726043d7611a8740.tar.xz
glibc-543477f78b9163dc1d74596c726043d7611a8740.zip
benchtests: Move iterator declaration into loop header
This is a minor style change to move the definition of I to its usage
scope instead of at the top of the function.  This is consistent with
glibc style guidelines and more importantly it was getting in the way
of my testing.

	* benchtests/bench-memcpy-walk.c (do_test): Move declaration
	of I into loop header.
	* benchtests/bench-memmove-walk.c (do_test): Likewise.
Diffstat (limited to 'benchtests/bench-memmove-walk.c')
-rw-r--r--benchtests/bench-memmove-walk.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/benchtests/bench-memmove-walk.c b/benchtests/bench-memmove-walk.c
index eee5d0bac7..80a7d62d4d 100644
--- a/benchtests/bench-memmove-walk.c
+++ b/benchtests/bench-memmove-walk.c
@@ -86,7 +86,6 @@ int
 test_main (void)
 {
   json_ctx_t json_ctx;
-  size_t i;
 
   test_init ();
 
@@ -106,7 +105,7 @@ test_main (void)
 
   json_array_begin (&json_ctx, "results");
   /* Non-overlapping buffers.  */
-  for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
+  for (size_t i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
     {
       /* Test length alignments from 0-16 bytes.  */
       for (int j = 0; j < 8; j++)
@@ -117,7 +116,7 @@ test_main (void)
     }
 
   /* Overlapping buffers.  */
-  for (i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
+  for (size_t i = START_SIZE; i <= MIN_PAGE_SIZE; i <<= 1)
     {
       /* Test length alignments from 0-16 bytes.  */
       for (int j = 0; j < 8; j++)