aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authorScott Prager <splinterofchaos@gmail.com>2014-09-05 04:25:34 -0400
committerScott Prager <splinterofchaos@gmail.com>2014-09-30 19:33:48 -0400
commiteff839b26df8b10b2334e2fbdaf81fbb3236b873 (patch)
tree04bd665543f461c09a9bb5b75bde2deccf588b84 /src/nvim/os
parentafe7ba1e71f0fe43817ae9abac56c721c99f95c6 (diff)
downloadrneovim-eff839b26df8b10b2334e2fbdaf81fbb3236b873.tar.gz
rneovim-eff839b26df8b10b2334e2fbdaf81fbb3236b873.tar.bz2
rneovim-eff839b26df8b10b2334e2fbdaf81fbb3236b873.zip
memory: xstrchrnul and xmemscan.
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/fs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c
index 07accb339a..36c2bb6d9b 100644
--- a/src/nvim/os/fs.c
+++ b/src/nvim/os/fs.c
@@ -134,10 +134,7 @@ static bool is_executable_in_path(const char_u *name, char_u **abspath)
// Walk through all entries in $PATH to check if "name" exists there and
// is an executable file.
for (;; ) {
- const char *e = strchr(path, ':');
- if (e == NULL) {
- e = path + STRLEN(path);
- }
+ const char *e = xstrchrnul(path, ':');
// Glue together the given directory from $PATH with name and save into
// buf.