From eff839b26df8b10b2334e2fbdaf81fbb3236b873 Mon Sep 17 00:00:00 2001 From: Scott Prager Date: Fri, 5 Sep 2014 04:25:34 -0400 Subject: memory: xstrchrnul and xmemscan. --- src/nvim/os/fs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/os') 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. -- cgit