Discussion:
[PATCH] Remove stray #ifdef _KERNEL in <sys/malloc.h>
Sebastian Huber
2018-08-23 11:25:39 UTC
Permalink
The malloc() macro definition is aready in an #ifdef _KERNEL section.
---
sys/sys/malloc.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index 06a88822ed5..68595091a58 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -215,7 +215,6 @@ void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like
* an inline function variant ended up being compiled to a mere malloc call
* regardless of argument. gcc generates expected code (like the above).
*/
-#ifdef _KERNEL
#define malloc(size, type, flags) ({ \
void *_malloc_item; \
size_t _size = (size); \
@@ -230,7 +229,6 @@ void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like
} \
_malloc_item; \
})
-#endif

void *malloc_domain(size_t size, struct malloc_type *type, int domain,
int flags) __malloc_like __result_use_check __alloc_size(1);
--
2.13.7
Mark Johnston
2018-08-23 15:02:22 UTC
Permalink
Post by Sebastian Huber
The malloc() macro definition is aready in an #ifdef _KERNEL section.
---
sys/sys/malloc.h | 2 --
1 file changed, 2 deletions(-)
Committed in r338252, thanks.

Loading...