summaryrefslogtreecommitdiff
path: root/extra/replace.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-17 22:53:57 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2018-05-21 16:34:10 +0000
commit3a7d7e180a871c5b2b2d98812d9d7f800cf33952 (patch)
treed4bd1765e16d3bf92d360b8c032b86f8a0b3a38f /extra/replace.c
parent2534ae20fd244eed569830bb7159518e42f24baa (diff)
downloadmariadb-git-3a7d7e180a871c5b2b2d98812d9d7f800cf33952.tar.gz
cleanup: create_temp_file()
simplify. move common code inside, specify common flags inside, rewrite dead code (`if (mode & O_TEMPORARY)` on Linux, where `O_TEMPORARY` is always 0) to actually do something.
Diffstat (limited to 'extra/replace.c')
-rw-r--r--extra/replace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/replace.c b/extra/replace.c
index eabf953837b..4086f22d129 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -1072,7 +1072,7 @@ static int convert_file(REPLACE *rep, char * name)
if (!(in= my_fopen(org_name,O_RDONLY,MYF(MY_WME))))
DBUG_RETURN(1);
dirname_part(dir_buff, org_name, &dir_buff_length);
- if ((temp_file= create_temp_file(tempname, dir_buff, "PR", O_WRONLY,
+ if ((temp_file= create_temp_file(tempname, dir_buff, "PR", 0,
MYF(MY_WME))) < 0)
{
my_fclose(in,MYF(0));