about summary refs log tree commit diff
path: root/string/test-memcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/test-memcmp.c')
-rw-r--r--string/test-memcmp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/string/test-memcmp.c b/string/test-memcmp.c
index a7969edaea..1538930534 100644
--- a/string/test-memcmp.c
+++ b/string/test-memcmp.c
@@ -441,11 +441,12 @@ check1 (void)
 
   n = 116;
   for (size_t i = 0; i < n; i++)
-    {
-      exp_result = SIMPLE_MEMCMP (s1 + i, s2 + i, n - i);
-      FOR_EACH_IMPL (impl, 0)
-	check_result (impl, s1 + i, s2 + i, n - i, exp_result);
-    }
+    for (size_t len = 0; len <= n - i; ++len)
+      {
+	exp_result = SIMPLE_MEMCMP (s1 + i, s2 + i, len);
+	FOR_EACH_IMPL (impl, 0)
+	  check_result (impl, s1 + i, s2 + i, len, exp_result);
+      }
 }
 
 /* This test checks that memcmp doesn't overrun buffers.  */