summaryrefslogtreecommitdiff
path: root/mysys/mf_dirname.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-10-08 23:20:19 +0300
committerunknown <monty@hundin.mysql.fi>2001-10-08 23:20:19 +0300
commit9417dc5c17bc0c35d04e20e600ce7804ec20e736 (patch)
treee7d13849a1d92edeaacd31753856f5a8cb389781 /mysys/mf_dirname.c
parent4c52928bc84a503fed81ebd7cf934a7857491aa5 (diff)
downloadmariadb-git-9417dc5c17bc0c35d04e20e600ce7804ec20e736.tar.gz
Portability fixes + a couple of bug fixes introduced by last push.
Docs/manual.texi: Removed wrong web links include/mysql_com.h: Portability fix libmysqld/Makefile.am: Fix 'make dist' mysys/mf_dirname.c: Bugfix for last push scripts/explain_log.sh: Nicer output scripts/mysql_install_db.sh: Removed warnings when using 'mysql_install_db' sql/sql_parse.cc: Ensure that thd->query_length is always set sql/sql_show.cc: cleanup sql/sql_yacc.yy: Fix bug in last push vio/vio.c: Merge with violite.cc vio/viosocket.c: Merge with violite.cc
Diffstat (limited to 'mysys/mf_dirname.c')
-rw-r--r--mysys/mf_dirname.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mysys/mf_dirname.c b/mysys/mf_dirname.c
index fb5d77d8ab8..a9d91963480 100644
--- a/mysys/mf_dirname.c
+++ b/mysys/mf_dirname.c
@@ -83,7 +83,7 @@ char *convert_dirname(char *to, const char *from, const char *from_end)
#if FN_LIBCHAR != '/' || defined(FN_C_BEFORE_DIR_2)
{
- while (*from && *from != end)
+ for (; *from && from != from_end; from++)
{
if (*from == '/')
*to++= FN_LIBCHAR;
@@ -94,8 +94,9 @@ char *convert_dirname(char *to, const char *from, const char *from_end)
*to++= FN_C_AFTER_DIR;
#endif
else
- *to++= *from++;
+ *to++= *from;
}
+ *to=0;
}
#else
/* This is ok even if to == from, becasue we need to cut the string */