summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-18 10:01:31 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-27 12:35:10 +0100
commit3cba74e032050b126eaf1fd27072b1afaeef79b3 (patch)
tree2a38e1a5224f7917d047f97b7631151eadd6d224
parent924a81a548994bd61e9b8ea662bdb64ef1c12ea0 (diff)
downloadmariadb-git-3cba74e032050b126eaf1fd27072b1afaeef79b3.tar.gz
cleanup: fn_format, remove dead code
my_realpath() ignores MY_xxx flags anyway
-rw-r--r--mysys/mf_format.c7
-rw-r--r--sql/sql_parse.cc3
2 files changed, 2 insertions, 8 deletions
diff --git a/mysys/mf_format.c b/mysys/mf_format.c
index d20ce882459..996fee68bd1 100644
--- a/mysys/mf_format.c
+++ b/mysys/mf_format.c
@@ -97,13 +97,8 @@ char * fn_format(char * to, const char *name, const char *dir,
pos=strmake(strmov(to,dev),name,length);
(void) strmov(pos,ext); /* Don't convert extension */
}
- /*
- If MY_RETURN_REAL_PATH and MY_RESOLVE_SYMLINK is given, only do
- realpath if the file is a symbolic link
- */
if (flag & MY_RETURN_REAL_PATH)
- (void) my_realpath(to, to, MYF(flag & MY_RESOLVE_SYMLINKS ?
- MY_RESOLVE_LINK: 0));
+ (void) my_realpath(to, to, MYF(0));
else if (flag & MY_RESOLVE_SYMLINKS)
{
strmov(buff,to);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3afabc079d0..a12a2c4193c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7715,8 +7715,7 @@ int test_if_data_home_dir(const char *dir)
if (!dir)
DBUG_RETURN(0);
- (void) fn_format(path, dir, "", "",
- (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS));
+ (void) fn_format(path, dir, "", "", MY_RETURN_REAL_PATH);
dir_len= strlen(path);
if (mysql_unpacked_real_data_home_len<= dir_len)
{