diff options
author | monty@hundin.mysql.fi <> | 2001-10-08 23:20:19 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-10-08 23:20:19 +0300 |
commit | 196f620e9024b12e33125c4be03c867b0fabbfcc (patch) | |
tree | e7d13849a1d92edeaacd31753856f5a8cb389781 /mysys/mf_dirname.c | |
parent | 46a660f450cfb78785838f4dc923eaf6b75c5961 (diff) | |
download | mariadb-git-196f620e9024b12e33125c4be03c867b0fabbfcc.tar.gz |
Portability fixes + a couple of bug fixes introduced by last push.
Diffstat (limited to 'mysys/mf_dirname.c')
-rw-r--r-- | mysys/mf_dirname.c | 5 |
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 */ |