diff options
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/path.c b/src/path.c index c01b1b9fa2..93ee6dddeb 100644 --- a/src/path.c +++ b/src/path.c @@ -93,15 +93,15 @@ char_u *path_tail_with_seperator(char_u *fname) return tail; } -/* - * get the next path component (just after the next path separator). - */ -char_u *getnextcomp(char_u *fname) +char_u *path_next_component(char_u *fname) { - while (*fname && !vim_ispathsep(*fname)) + assert(fname != NULL); + while (*fname != NUL && !vim_ispathsep(*fname)) { mb_ptr_adv(fname); - if (*fname) + } + if (*fname != NUL) { ++fname; + } return fname; } @@ -1428,7 +1428,7 @@ void simplify_filename(char_u *filename) } } else { ++components; /* simple path component */ - p = getnextcomp(p); + p = path_next_component(p); } } while (*p != NUL); } |