mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 09:56:31 +00:00
memory: xstrchrnul and xmemscan.
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user