diff options
author | unknown <monty@mysql.com> | 2004-02-19 22:04:31 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-02-19 22:04:31 +0200 |
commit | 68242939d818cf5d091d5dcf13e312994f423f9f (patch) | |
tree | ee35dca9ef62332db78569be7002fc980ec60ea7 /mysys/mf_tempfile.c | |
parent | a01a3dd5ef15be9bd6b5b087491d3e676e88c29c (diff) | |
download | mariadb-git-68242939d818cf5d091d5dcf13e312994f423f9f.tar.gz |
Fixed usage of strxnmov() in recent changesets
libmysql/libmysql.c:
szPipeName -> pipe_name
fixed usage of strxnmov()
mysys/mf_tempfile.c:
Fixed usage of strnxmov()
Simple optimization
mysys/my_tempnam.c:
Fixed usage of strnxmov()
Simple optimization
sql/log.cc:
simple optimization
sql/mini_client.cc:
szPipeName -> pipe_name
fixed usage of strxnmov()
sql/mysqld.cc:
szPipeName -> pipe_name
fixed usage of strxnmov()
Fixed indentation
Diffstat (limited to 'mysys/mf_tempfile.c')
-rw-r--r-- | mysys/mf_tempfile.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 187f459a8ab..14b8fdc430c 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -123,11 +123,12 @@ File create_temp_file(char *to, const char *dir, const char *prefix, } #ifdef OS2 /* changing environ variable doesn't work with VACPP */ - char buffer[256]; - strxnmov(buffer, sizeof(buffer), "TMP=", dir); + char buffer[256], *end; + buffer[sizeof[buffer)-1]= 0; + end= strxnmov(buffer, sizeof(buffer)-1, (char*) "TMP=", dir, NullS); /* remove ending backslash */ - if (buffer[strlen(buffer)-1] == '\\') - buffer[strlen(buffer)-1] = '\0'; + if (end[-1] == '\\') + end[-1]= 0; putenv(buffer); #elif !defined(__NETWARE__) old_env= (char**) environ; |