diff options
| author | mrg <mrg@NetBSD.org> | 2018-02-06 09:28:48 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2018-02-06 09:28:48 +0000 |
| commit | ab0849a2240f0f359cc28e83473758bb5cbba769 (patch) | |
| tree | 66d810410b63e1994e5f91178e40aeb86351fc27 /common/lib/libc/string | |
| parent | 7f12b021671961bba7ca6b8743b049ecc579833a (diff) | |
- remove two more _DIAGASSERT() checks against not NULL for functions
with arguments with nonnull attributes. in two cases, leave
code behind that should set defaults to "(null)".
Diffstat (limited to 'common/lib/libc/string')
| -rw-r--r-- | common/lib/libc/string/memset.c | 6 | ||||
| -rw-r--r-- | common/lib/libc/string/strlen.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/common/lib/libc/string/memset.c b/common/lib/libc/string/memset.c index 6468c2293ec..9055142a378 100644 --- a/common/lib/libc/string/memset.c +++ b/common/lib/libc/string/memset.c @@ -1,4 +1,4 @@ -/* $NetBSD: memset.c,v 1.10 2013/12/02 21:21:33 joerg Exp $ */ +/* $NetBSD: memset.c,v 1.11 2018/02/06 09:28:48 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)memset.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: memset.c,v 1.10 2013/12/02 21:21:33 joerg Exp $"); +__RCSID("$NetBSD: memset.c,v 1.11 2018/02/06 09:28:48 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -106,8 +106,6 @@ memset(void *dst0, int c0, size_t length) #endif u_char *dst; - _DIAGASSERT(dst0 != 0); - dst = dst0; /* * If not enough words, just fill bytes. A length >= 2 words diff --git a/common/lib/libc/string/strlen.c b/common/lib/libc/string/strlen.c index 84195a3fa71..ec4b17751d8 100644 --- a/common/lib/libc/string/strlen.c +++ b/common/lib/libc/string/strlen.c @@ -1,4 +1,4 @@ -/* $NetBSD: strlen.c,v 1.2 2007/06/04 18:19:27 christos Exp $ */ +/* $NetBSD: strlen.c,v 1.3 2018/02/06 09:28:48 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)strlen.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: strlen.c,v 1.2 2007/06/04 18:19:27 christos Exp $"); +__RCSID("$NetBSD: strlen.c,v 1.3 2018/02/06 09:28:48 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -50,8 +50,6 @@ strlen(const char *str) { const char *s; - _DIAGASSERT(str != NULL); - for (s = str; *s; ++s) continue; return(s - str); |
