diff options
| author | Martin Matuska <mm@FreeBSD.org> | 2012-06-30 07:46:38 +0000 |
|---|---|---|
| committer | Martin Matuska <mm@FreeBSD.org> | 2012-06-30 07:46:38 +0000 |
| commit | 4a37bb98c980176bf8002f7ccd8807092ff8f9cf (patch) | |
| tree | fb4e00bd775ffa753a3b8466008fa3dbca70d12d /lib/libdtrace/common/dt_string.c | |
| parent | e0ea83ebb1a4b194c927cb114766e8781676380b (diff) | |
Notes
Diffstat (limited to 'lib/libdtrace/common/dt_string.c')
| -rw-r--r-- | lib/libdtrace/common/dt_string.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/libdtrace/common/dt_string.c b/lib/libdtrace/common/dt_string.c index 3a5315eef99a..782d66c2b8a6 100644 --- a/lib/libdtrace/common/dt_string.c +++ b/lib/libdtrace/common/dt_string.c @@ -29,23 +29,6 @@ #include <ctype.h> #include <dt_string.h> -#include <dt_impl.h> - -/* - * Create a copy of string s, but only duplicate the first n bytes. - */ -char * -strndup(const char *s, size_t n) -{ - char *s2 = malloc(n + 1); - - if (s2 == NULL) - longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); - - (void) strncpy(s2, s, n); - s2[n] = '\0'; - return (s2); -} /* * Transform string s inline, converting each embedded C escape sequence string |
