malloc.c: Remove bogus __nonnull attribute
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
Commit Message
This function doesn't accept pointers.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
malloc/malloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> writes:
> This function doesn't accept pointers.
Does __nonnull() tell the compiler anything about not-pointers that
can't be zero? Asking for a friend... ;-)
LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>
> -checked_request2size (size_t req) __nonnull (1)
> +checked_request2size (size_t req)
On 2023-07-11 18:55, DJ Delorie wrote:
> Alejandro Colomar via Libc-alpha <libc-alpha@sourceware.org> writes:
>> This function doesn't accept pointers.
>
> Does __nonnull() tell the compiler anything about not-pointers that
> can't be zero? Asking for a friend... ;-)
>
> LGTM
> Reviewed-by: DJ Delorie <dj@redhat.com>
Thanks! :-)
Whoever applies this, you could also add:
Fixes: 7519dee356a0 ("malloc: Simplify checked_request2size interface")
>
>> -checked_request2size (size_t req) __nonnull (1)
>> +checked_request2size (size_t req)
>
@@ -1315,7 +1315,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
MINSIZE in case the value is less than MINSIZE, or 0 if any of the
previous checks fail. */
static inline size_t
-checked_request2size (size_t req) __nonnull (1)
+checked_request2size (size_t req)
{
if (__glibc_unlikely (req > PTRDIFF_MAX))
return 0;