Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/string - remove two more _DIAGASSERT() check...
details: https://anonhg.NetBSD.org/src/rev/c34454690a1d
branches: trunk
changeset: 829583:c34454690a1d
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Feb 06 09:28:48 2018 +0000
description:
- 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:
common/lib/libc/string/memset.c | 6 ++----
common/lib/libc/string/strlen.c | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diffs (54 lines):
diff -r 33407fe01c8e -r c34454690a1d common/lib/libc/string/memset.c
--- a/common/lib/libc/string/memset.c Tue Feb 06 09:22:57 2018 +0000
+++ b/common/lib/libc/string/memset.c Tue Feb 06 09:28:48 2018 +0000
@@ -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 @@
#endif
u_char *dst;
- _DIAGASSERT(dst0 != 0);
-
dst = dst0;
/*
* If not enough words, just fill bytes. A length >= 2 words
diff -r 33407fe01c8e -r c34454690a1d common/lib/libc/string/strlen.c
--- a/common/lib/libc/string/strlen.c Tue Feb 06 09:22:57 2018 +0000
+++ b/common/lib/libc/string/strlen.c Tue Feb 06 09:28:48 2018 +0000
@@ -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 @@
{
const char *s;
- _DIAGASSERT(str != NULL);
-
for (s = str; *s; ++s)
continue;
return(s - str);
Home |
Main Index |
Thread Index |
Old Index