Remove bzero declaration

The kernel was migrated to memset in ba96f37758 ("Use __builtin
for various mem* and b* (e.g. bzero) routines.") and there are no
remaining architectures using the file.

malloc is augmented to prevent KMSAN from breaking.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Mateusz Guzik 2021-08-23 16:20:53 +00:00
parent a4c33d65f2
commit e72e16c55d
2 changed files with 1 additions and 2 deletions

View File

@ -233,7 +233,7 @@ void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like
_malloc_item = malloc(_size, type, (flags) &~ M_ZERO); \
if (((flags) & M_WAITOK) != 0 || \
__predict_true(_malloc_item != NULL)) \
bzero(_malloc_item, _size); \
memset(_malloc_item, 0, _size); \
} else { \
_malloc_item = malloc(_size, type, flags); \
} \

View File

@ -342,7 +342,6 @@ void hexdump(const void *ptr, int length, const char *hdr, int flags);
#define ovbcopy(f, t, l) bcopy((f), (t), (l))
void bcopy(const void * _Nonnull from, void * _Nonnull to, size_t len);
void bzero(void * _Nonnull buf, size_t len);
void explicit_bzero(void * _Nonnull, size_t);
void *memset(void * _Nonnull buf, int c, size_t len);