diff options
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/ut0mem.h | 10 | ||||
-rw-r--r-- | innobase/os/os0file.c | 6 | ||||
-rw-r--r-- | innobase/ut/ut0mem.c | 24 |
3 files changed, 3 insertions, 37 deletions
diff --git a/innobase/include/ut0mem.h b/innobase/include/ut0mem.h index b208fac8691..bfc937eb212 100644 --- a/innobase/include/ut0mem.h +++ b/innobase/include/ut0mem.h @@ -129,16 +129,6 @@ ut_str_catenate( char* str1, /* in: null-terminated string */ char* str2); /* in: null-terminated string */ -/************************************************************************** -Return a copy of the given string. The returned string must be freed -using mem_free. */ - -char* -ut_strdup( -/*======*/ - /* out, own: cnull-terminated string */ - char* str); /* in: null-terminated string */ - #ifndef UNIV_NONINL #include "ut0mem.ic" #endif diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 3f14a2158ed..aad8a911fd5 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -2314,18 +2314,18 @@ os_file_dirname( if (last_slash < 0) { /* no slash in the path, return "." */ - return(ut_strdup((char*)".")); + return(mem_strdup(".")); } /* ok, there is a slash */ if (last_slash == 0) { /* last slash is the first char of the path */ - return(ut_strdup((char*)"/")); + return(mem_strdup("/")); } /* non-trivial directory component */ - dir = ut_strdup(path); + dir = mem_strdup(path); dir[last_slash] = 0; return(dir); diff --git a/innobase/ut/ut0mem.c b/innobase/ut/ut0mem.c index 9d0e63e6099..f21bb752fac 100644 --- a/innobase/ut/ut0mem.c +++ b/innobase/ut/ut0mem.c @@ -299,27 +299,3 @@ ut_str_catenate( return(str); } - -/************************************************************************** -Return a copy of the given string. The returned string must be freed -using mem_free. */ - -char* -ut_strdup( -/*======*/ - /* out, own: cnull-terminated string */ - char* str) /* in: null-terminated string */ -{ - ulint len; - char* copy; - - len = ut_strlen(str); - - copy = mem_alloc(len + 1); - - ut_memcpy(copy, str, len); - - copy[len] = 0; - - return(copy); -} |