summaryrefslogtreecommitdiff
path: root/usr/src/lib/abi
diff options
context:
space:
mode:
authordg199075 <none@none>2006-11-22 08:04:27 -0800
committerdg199075 <none@none>2006-11-22 08:04:27 -0800
commitadecd3c68045d04dc367d30faf2eb5cac1f45d5a (patch)
tree9424c458db71c461ce377a83b5a8ba77eca9fd4d /usr/src/lib/abi
parent1039f409262fcc394c002cfbadf60149156d2bcb (diff)
downloadillumos-joyent-adecd3c68045d04dc367d30faf2eb5cac1f45d5a.tar.gz
PSARC/2006/617 strnlen()
6478299 Add strnlen Contributed by Richard L. Hamilton
Diffstat (limited to 'usr/src/lib/abi')
-rw-r--r--usr/src/lib/abi/apptrace/common/interceptlib.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/usr/src/lib/abi/apptrace/common/interceptlib.c b/usr/src/lib/abi/apptrace/common/interceptlib.c
index a2ea131ce9..c17f0767a3 100644
--- a/usr/src/lib/abi/apptrace/common/interceptlib.c
+++ b/usr/src/lib/abi/apptrace/common/interceptlib.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -48,20 +47,6 @@ static lwp_mutex_t abi_stdio_mutex = DEFAULTMUTEX;
static volatile thread_t locktid = NOTID;
static volatile int count;
-size_t
-strnlen(const char *s, size_t n)
-{
- char *ptr;
-
- if (s == NULL)
- return (n);
- ptr = memchr(s, 0, n);
- if (ptr == NULL)
- return (n);
-
- return ((ptr - s) + 1);
-}
-
/* Return true on empty */
int
is_empty_string(char const *s)