about summary refs log tree commit diff
path: root/malloc/tst-scratch_buffer.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-11 13:23:25 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-28 18:43:58 +0100
commit8c77e26ba8b360c851b2b9485bb4431aacc51ad1 (patch)
treebca09d61b08c490108fb5dd3f4b3b3be7c8be2ae /malloc/tst-scratch_buffer.c
parent2eeeee7636cb52a09740598404808def17cf750e (diff)
downloadglibc-8c77e26ba8b360c851b2b9485bb4431aacc51ad1.tar.gz
glibc-8c77e26ba8b360c851b2b9485bb4431aacc51ad1.tar.xz
glibc-8c77e26ba8b360c851b2b9485bb4431aacc51ad1.zip
Remove unused scratch_buffer_dupfree
Turns out scratch_buffer_dupfree internal API was unused since

commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f
stdlib: Simplify buffer management in canonicalize

And the related test in malloc/tst-scratch_buffer had issues
so it's better to remove it completely.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'malloc/tst-scratch_buffer.c')
-rw-r--r--malloc/tst-scratch_buffer.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/malloc/tst-scratch_buffer.c b/malloc/tst-scratch_buffer.c
index 9fcb11ba2c..1f1e770486 100644
--- a/malloc/tst-scratch_buffer.c
+++ b/malloc/tst-scratch_buffer.c
@@ -151,26 +151,6 @@ do_test (void)
 	  && array_size_must_fail (4, ((size_t)-1) / 4)))
 	return 1;
   }
-  {
-    struct scratch_buffer buf;
-    scratch_buffer_init (&buf);
-    memset (buf.data, '@', buf.length);
-
-    size_t sizes[] = { 16, buf.length, buf.length + 16 };
-    for (int i = 0; i < array_length (sizes); i++)
-      {
-        /* The extra size is unitialized through realloc.  */
-        size_t l = sizes[i] > buf.length ? sizes[i] : buf.length;
-        void *r = scratch_buffer_dupfree (&buf, l);
-        void *c = xmalloc (l);
-        memset (c, '@', l);
-        TEST_COMPARE_BLOB (r, l, buf.data, l);
-        free (r);
-        free (c);
-      }
-
-    scratch_buffer_free (&buf);
-  }
   return 0;
 }