diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2018-01-08 15:41:48 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2018-01-08 15:41:48 +0000 |
commit | 6db47c9d5bb0f1614e9f1c68ea99651c5a0158f8 (patch) | |
tree | b452b85c816fa9b884619876bdd487e426071c80 | |
parent | de2b2c908a6d1f59c30fa3c5d177c994b8651d14 (diff) | |
download | src-6db47c9d5bb0f1614e9f1c68ea99651c5a0158f8.tar.gz src-6db47c9d5bb0f1614e9f1c68ea99651c5a0158f8.zip |
malloc(9): drop the __result_use_check attribute for the kernel allocator.
The __result_use_check attribute was brought to the kernel malloc in
r281203 for consistency with the userland malloc.
For the case of the M_WAITOK flag, the kernel malloc(), realloc(), and
reallocf() cannot return NULL so in that case the __result_use_check
attribute makes no sense.
We don't have any way of conditionalizing such attributes so just drop it.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=327697
-rw-r--r-- | sys/sys/malloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index a5c2d4be7223..f33791e6673e 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -176,7 +176,7 @@ void *contigmalloc(unsigned long size, struct malloc_type *type, int flags, __alloc_size(1) __alloc_align(6); void free(void *addr, struct malloc_type *type); void *malloc(unsigned long size, struct malloc_type *type, int flags) - __malloc_like __result_use_check __alloc_size(1); + __malloc_like __alloc_size(1); void *mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size(1) __alloc_size(2); @@ -187,7 +187,7 @@ void malloc_type_freed(struct malloc_type *type, unsigned long size); void malloc_type_list(malloc_type_list_func_t *, void *); void malloc_uninit(void *); void *realloc(void *addr, unsigned long size, struct malloc_type *type, - int flags) __result_use_check __alloc_size(2); + int flags) __alloc_size(2); void *reallocf(void *addr, unsigned long size, struct malloc_type *type, int flags) __alloc_size(2); |