From 36da2cba5b16489e11d6a250d1133d60edfb78ce Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Wed, 20 Jul 2005 13:23:59 +0000 Subject: Clean up strlc??.c and hook them up. svn path=/trunk/; revision=4139 --- strlcpy.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'strlcpy.c') diff --git a/strlcpy.c b/strlcpy.c index fab8dac7..64d9c575 100644 --- a/strlcpy.c +++ b/strlcpy.c @@ -17,28 +17,10 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#if HAVE_NBTOOL_CONFIG_H -#include "nbtool_config.h" -#endif - -#include -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strlcpy.c,v 1.14 2003/10/27 00:12:42 lukem Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#ifdef _LIBC -#include "namespace.h" -#endif #include #include #include -#ifdef _LIBC -# ifdef __weak_alias -__weak_alias(strlcpy, _strlcpy) -# endif -#endif - #if !HAVE_STRLCPY /* * Copy src to string dst of size siz. At most siz-1 characters @@ -46,11 +28,7 @@ __weak_alias(strlcpy, _strlcpy) * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t -#ifdef _LIBC -_strlcpy(dst, src, siz) -#else strlcpy(dst, src, siz) -#endif char *dst; const char *src; size_t siz; @@ -59,9 +37,6 @@ strlcpy(dst, src, siz) const char *s = src; size_t n = siz; - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { do { -- cgit v1.2.3