aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Bainter <mbainter+github@gmail.com>2015-04-17 19:27:59 +0000
committerMark Bainter <mbainter+github@gmail.com>2015-04-18 21:37:10 +0000
commit30cdba80ddc47a56810a095613a1e6b5a1529ff6 (patch)
tree974b94e390ac8e56b9d49773ce4c3526f13a3443
parenta7e17de048b0791329cf1ad4d4c291290a99040a (diff)
downloadrneovim-30cdba80ddc47a56810a095613a1e6b5a1529ff6.tar.gz
rneovim-30cdba80ddc47a56810a095613a1e6b5a1529ff6.tar.bz2
rneovim-30cdba80ddc47a56810a095613a1e6b5a1529ff6.zip
Refactor after_pathsep() to use const qualified args
-rw-r--r--src/nvim/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index f09c67a439..3e2ed53ca9 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1682,7 +1682,7 @@ void path_fix_case(char_u *name)
* Takes care of multi-byte characters.
* "b" must point to the start of the file name
*/
-int after_pathsep(char *b, char *p)
+int after_pathsep(const char *b, const char *p)
{
return p > b && vim_ispathsep(p[-1])
&& (!has_mbyte || (*mb_head_off)((char_u *)b, (char_u *)p - 1) == 0);
@@ -1761,7 +1761,7 @@ int pathcmp(const char *p, const char *q, int maxlen)
/* ignore a trailing slash, but not "//" or ":/" */
if (c2 == NUL
&& i > 0
- && !after_pathsep((char *)s, (char *)s + i)
+ && !after_pathsep(s, s + i)
#ifdef BACKSLASH_IN_FILENAME
&& (c1 == '/' || c1 == '\\')
#else