due to an overwhelming rush of complaints, remove the check for NULL
pointers. apparantly a lot of developers feel that potentially dumping core is better than returning a status of `0 bytes copied'...
This commit is contained in:
parent
1a3995bac1
commit
cb7f9fc8ac
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strlcat.c,v 1.2 1999/09/08 22:56:55 lukem Exp $ */
|
||||
/* $NetBSD: strlcat.c,v 1.3 1999/09/10 23:13:09 lukem Exp $ */
|
||||
/* from OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp */
|
||||
|
||||
/*
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: strlcat.c,v 1.2 1999/09/08 22:56:55 lukem Exp $");
|
||||
__RCSID("$NetBSD: strlcat.c,v 1.3 1999/09/10 23:13:09 lukem Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -53,9 +53,6 @@ strlcat(dst, src, siz)
|
|||
register size_t n = siz;
|
||||
size_t dlen;
|
||||
|
||||
if (dst == NULL || src == NULL)
|
||||
return (0);
|
||||
|
||||
/* Find the end of dst and adjust bytes left but don't go past end */
|
||||
while (*d != '\0' && n-- != 0)
|
||||
d++;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strlcpy.c,v 1.2 1999/09/08 22:56:56 lukem Exp $ */
|
||||
/* $NetBSD: strlcpy.c,v 1.3 1999/09/10 23:13:09 lukem Exp $ */
|
||||
/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */
|
||||
|
||||
/*
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: strlcpy.c,v 1.2 1999/09/08 22:56:56 lukem Exp $");
|
||||
__RCSID("$NetBSD: strlcpy.c,v 1.3 1999/09/10 23:13:09 lukem Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -51,9 +51,6 @@ strlcpy(dst, src, siz)
|
|||
register const char *s = src;
|
||||
register size_t n = siz;
|
||||
|
||||
if (dst == NULL || src == NULL)
|
||||
return (0);
|
||||
|
||||
/* Copy as many bytes as will fit */
|
||||
if (n != 0 && --n != 0) {
|
||||
do {
|
||||
|
|
Loading…
Reference in New Issue