From 8c77e26ba8b360c851b2b9485bb4431aacc51ad1 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 11 Oct 2022 13:23:25 +0100 Subject: 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 --- include/scratch_buffer.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'include') diff --git a/include/scratch_buffer.h b/include/scratch_buffer.h index e4c5c8a..a9bdcad 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 */ -- cgit v1.1