Module Name:    src
Committed By:   mrg
Date:           Tue Feb  6 09:28:48 UTC 2018

Modified Files:
        src/common/lib/libc/string: memset.c strlen.c

Log Message:
- 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)".


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/common/lib/libc/string/memset.c
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/string/strlen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/string/memset.c
diff -u src/common/lib/libc/string/memset.c:1.10 src/common/lib/libc/string/memset.c:1.11
--- src/common/lib/libc/string/memset.c:1.10	Mon Dec  2 21:21:33 2013
+++ src/common/lib/libc/string/memset.c	Tue Feb  6 09:28:48 2018
@@ -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

Index: src/common/lib/libc/string/strlen.c
diff -u src/common/lib/libc/string/strlen.c:1.2 src/common/lib/libc/string/strlen.c:1.3
--- src/common/lib/libc/string/strlen.c:1.2	Mon Jun  4 18:19:27 2007
+++ src/common/lib/libc/string/strlen.c	Tue Feb  6 09:28:48 2018
@@ -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);

Reply via email to