about summary refs log tree commit diff
path: root/benchtests
diff options
context:
space:
mode:
Diffstat (limited to 'benchtests')
-rw-r--r--benchtests/bench-strcpy.c7
-rw-r--r--benchtests/bench-string.h2
-rw-r--r--benchtests/bench-strlen.c10
3 files changed, 10 insertions, 9 deletions
diff --git a/benchtests/bench-strcpy.c b/benchtests/bench-strcpy.c
index 92cad4cc65..9fe999e5f4 100644
--- a/benchtests/bench-strcpy.c
+++ b/benchtests/bench-strcpy.c
@@ -102,11 +102,11 @@ do_test (size_t align1, size_t align2, size_t len, int max_char)
    but in wchar_ts, in bytes it will equal to align * (sizeof (wchar_t))
    len for wcschr here isn't in bytes but it's number of wchar_t symbols.  */
   align1 &= 7;
-  if ((align1 + len) * sizeof(CHAR) >= page_size)
+  if ((align1 + len) * sizeof (CHAR) >= page_size)
     return;
 
   align2 &= 7;
-  if ((align2 + len) * sizeof(CHAR) >= page_size)
+  if ((align2 + len) * sizeof (CHAR) >= page_size)
     return;
 
   s1 = (CHAR *) (buf1) + align1;
@@ -116,7 +116,8 @@ do_test (size_t align1, size_t align2, size_t len, int max_char)
     s1[i] = 32 + 23 * i % (max_char - 32);
   s1[len] = 0;
 
-  printf ("Length %4zd, alignments in bytes %2zd/%2zd:", len, align1 * sizeof(CHAR), align2 * sizeof(CHAR));
+  printf ("Length %4zd, alignments in bytes %2zd/%2zd:", len,
+	  align1 * sizeof (CHAR), align2 * sizeof (CHAR));
 
   FOR_EACH_IMPL (impl, 0)
     do_one_test (impl, s2, s1, len);
diff --git a/benchtests/bench-string.h b/benchtests/bench-string.h
index e1014ead77..9d3332a624 100644
--- a/benchtests/bench-string.h
+++ b/benchtests/bench-string.h
@@ -156,7 +156,7 @@ cmdline_process_function (int c)
       case OPT_RANDOM:
 	{
 	  int fdr = open ("/dev/urandom", O_RDONLY);
-	  if (fdr < 0 || read (fdr, &seed, sizeof(seed)) != sizeof (seed))
+	  if (fdr < 0 || read (fdr, &seed, sizeof (seed)) != sizeof (seed))
 	    seed = time (NULL);
 	  if (fdr >= 0)
 	    close (fdr);
diff --git a/benchtests/bench-strlen.c b/benchtests/bench-strlen.c
index f86095a5d3..f6a8bf5dff 100644
--- a/benchtests/bench-strlen.c
+++ b/benchtests/bench-strlen.c
@@ -75,7 +75,7 @@ do_test (json_ctx_t *json_ctx, size_t align, size_t len)
   size_t i;
 
   align &= 63;
-  if (align + sizeof(CHAR) * len >= page_size)
+  if (align + sizeof (CHAR) * len >= page_size)
     return;
 
   json_element_object_begin (json_ctx);
@@ -127,16 +127,16 @@ test_main (void)
 
   for (i = 1; i < 8; ++i)
   {
-    do_test (&json_ctx, sizeof(CHAR) * i, i);
+    do_test (&json_ctx, sizeof (CHAR) * i, i);
     do_test (&json_ctx, 0, i);
   }
 
   for (i = 2; i <= 12; ++i)
     {
       do_test (&json_ctx, 0, 1 << i);
-      do_test (&json_ctx, sizeof(CHAR) * 7, 1 << i);
-      do_test (&json_ctx, sizeof(CHAR) * i, 1 << i);
-      do_test (&json_ctx, sizeof(CHAR) * i, (size_t)((1 << i) / 1.5));
+      do_test (&json_ctx, sizeof (CHAR) * 7, 1 << i);
+      do_test (&json_ctx, sizeof (CHAR) * i, 1 << i);
+      do_test (&json_ctx, sizeof (CHAR) * i, (size_t)((1 << i) / 1.5));
     }
 
   json_array_end (&json_ctx);