Remove duplicated code.

Suggested by:	jmg
This commit is contained in:
Xin LI 2014-10-16 22:04:07 +00:00
parent cfcdd438f4
commit d427f43c25
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273189
3 changed files with 5 additions and 22 deletions

View File

@ -2,6 +2,7 @@
# $FreeBSD$
.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string
.PATH: ${LIBC_SRCTOP}/../../sys/libkern
CFLAGS+= -I${LIBC_SRCTOP}/locale

View File

@ -1,22 +0,0 @@
/* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */
/*
* Public domain.
* Written by Matthew Dempsky.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <string.h>
__attribute__((weak)) void
__explicit_bzero_hook(void *buf, size_t len)
{
}
void
explicit_bzero(void *buf, size_t len)
{
memset(buf, 0, len);
__explicit_bzero_hook(buf, len);
}

View File

@ -7,7 +7,11 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#ifdef _KERNEL
#include <sys/libkern.h>
#else
#include <string.h>
#endif /* _KERNEL */
__attribute__((weak)) void __explicit_bzero_hook(void *, size_t);