aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-24 11:21:20 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-03-24 14:17:40 +0100
commit998a16c926623a667ecb0228f4a6cd8ba1e90201 (patch)
tree00abaed092dd47e6e312a00f549ab62a4ded3a43 /src/nvim/memline.c
parent84a25770ac4b1c18f0e6bd1e17bdda7eb3c6afa0 (diff)
downloadrneovim-998a16c926623a667ecb0228f4a6cd8ba1e90201.tar.gz
rneovim-998a16c926623a667ecb0228f4a6cd8ba1e90201.tar.bz2
rneovim-998a16c926623a667ecb0228f4a6cd8ba1e90201.zip
refactor/rename: path_is_absolute()
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 6ae15d8e16..c11ca74f5c 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -3020,20 +3020,17 @@ int resolve_symlink(const char_u *fname, char_u *buf)
}
buf[ret] = NUL;
- /*
- * Check whether the symlink is relative or absolute.
- * If it's relative, build a new path based on the directory
- * portion of the filename (if any) and the path the symlink
- * points to.
- */
- if (path_is_absolute_path(buf))
+ // Check whether the symlink is relative or absolute.
+ // If it's relative, build a new path based on the directory
+ // portion of the filename (if any) and the path the symlink
+ // points to.
+ if (path_is_absolute(buf)) {
STRCPY(tmp, buf);
- else {
- char_u *tail;
-
- tail = path_tail(tmp);
- if (STRLEN(tail) + STRLEN(buf) >= MAXPATHL)
+ } else {
+ char_u *tail = path_tail(tmp);
+ if (STRLEN(tail) + STRLEN(buf) >= MAXPATHL) {
return FAIL;
+ }
STRCPY(tail, buf);
}
}