summary refs log tree commit diff
path: root/string/test-strncmp.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-04-07 08:21:00 +0200
committerAndreas Schwab <schwab@redhat.com>2011-04-07 08:21:00 +0200
commit821ae7137b7b4dacdd7fcb73e4f3d479afed1014 (patch)
treee71f33c0e0d2eaec08013ff91d490b396d188d84 /string/test-strncmp.c
parente513f34605747f43eed259519b6fb847591861d2 (diff)
downloadglibc-821ae7137b7b4dacdd7fcb73e4f3d479afed1014.tar.gz
glibc-821ae7137b7b4dacdd7fcb73e4f3d479afed1014.tar.xz
glibc-821ae7137b7b4dacdd7fcb73e4f3d479afed1014.zip
Revert "Fix strncmp page test to limit length to size of object"
This reverts commit e513f34605747f43eed259519b6fb847591861d2.
Diffstat (limited to 'string/test-strncmp.c')
-rw-r--r--string/test-strncmp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/string/test-strncmp.c b/string/test-strncmp.c
index 880b2be740..00971df22f 100644
--- a/string/test-strncmp.c
+++ b/string/test-strncmp.c
@@ -204,7 +204,6 @@ do_page_test (size_t offset1, size_t offset2, char *s2)
 {
   char *s1;
   int exp_result;
-  size_t max_offset = offset1 > offset2 ? offset1 : offset2;
 
   if (offset1 >= page_size || offset2 >= page_size)
     return;
@@ -212,12 +211,12 @@ do_page_test (size_t offset1, size_t offset2, char *s2)
   s1 = (char *) (buf1 + offset1);
   s2 += offset2;
 
-  exp_result = *s1;
+  exp_result= *s1;
 
   FOR_EACH_IMPL (impl, 0)
     {
-      check_result (impl, s1, s2, page_size - max_offset, -exp_result);
-      check_result (impl, s2, s1, page_size - max_offset, exp_result);
+      check_result (impl, s1, s2, page_size, -exp_result);
+      check_result (impl, s2, s1, page_size, exp_result);
     }
 }