[PATCH] Remove stray #ifdef _KERNEL in <sys/malloc.h>

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Aug 23 11:25:42 UTC 2018


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



More information about the freebsd-hackers mailing list