]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdlib: Remove unused is_aligned function from qsort.c
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 17 Jan 2024 11:08:01 +0000 (08:08 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 17 Jan 2024 11:08:56 +0000 (08:08 -0300)
Checked on x86_64-linux-gnu.

stdlib/qsort.c

index 45af8da80c3226a19c414a3c99b0c16617e27293..7f5a00fb3327e341824ead2319851b861c7adc43 100644 (file)
@@ -40,19 +40,6 @@ enum swap_type_t
 typedef uint32_t __attribute__ ((__may_alias__)) u32_alias_t;
 typedef uint64_t __attribute__ ((__may_alias__)) u64_alias_t;
 
-/* If this function returns true, elements can be safely copied using word
-   loads and stores.  Otherwise, it might not be safe.  BASE (as an integer)
-   must be a multiple of the word alignment.  SIZE must be a multiple of
-   WORDSIZE.  Since WORDSIZE must be a multiple of the word alignment, and
-   WORDSIZE is a power of two on all supported platforms, this function for
-   speed merely checks that BASE and SIZE are both multiples of the word
-   size.  */
-static inline bool
-is_aligned (const void *base, size_t size, size_t wordsize)
-{
-  return (((uintptr_t) base | size) & (wordsize - 1)) == 0;
-}
-
 static inline void
 swap_words_64 (void * restrict a, void * restrict b, size_t n)
 {