Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
05a716a7
Commit
05a716a7
authored
May 11, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Replace ut_strdup() with mem_strdup()
parent
ce471412
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
37 deletions
+3
-37
innobase/include/ut0mem.h
innobase/include/ut0mem.h
+0
-10
innobase/os/os0file.c
innobase/os/os0file.c
+3
-3
innobase/ut/ut0mem.c
innobase/ut/ut0mem.c
+0
-24
No files found.
innobase/include/ut0mem.h
View file @
05a716a7
...
...
@@ -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
...
...
innobase/os/os0file.c
View file @
05a716a7
...
...
@@ -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
);
...
...
innobase/ut/ut0mem.c
View file @
05a716a7
...
...
@@ -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
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment