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/strlen.c | |
| 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/strlen.c')
| -rw-r--r-- | common/lib/libc/string/strlen.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |
