about summary refs log tree commit diff
path: root/include
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 /include
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 'include')
-rw-r--r--include/scratch_buffer.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/include/scratch_buffer.h b/include/scratch_buffer.h
index e4c5c8a85d..a9bdcadec2 100644
--- a/include/scratch_buffer.h
+++ b/include/scratch_buffer.h
@@ -132,20 +132,4 @@ scratch_buffer_set_array_size (struct scratch_buffer *buffer,
 			 (buffer, nelem, size));
 }
 
-/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block,
-   deallocating *BUFFER if it was heap-allocated.  SIZE must be at
-   most *BUFFER's size.  Return NULL (setting errno) on memory
-   exhaustion.  */
-void *__libc_scratch_buffer_dupfree (struct scratch_buffer *buffer,
-                                     size_t size);
-libc_hidden_proto (__libc_scratch_buffer_dupfree)
-
-/* Alias for __libc_scratch_dupfree.  */
-static __always_inline void *
-scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size)
-{
-  void *r = __libc_scratch_buffer_dupfree (buffer, size);
-  return __glibc_likely (r != NULL) ? r : NULL;
-}
-
 #endif /* _SCRATCH_BUFFER_H */