mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
memline: Fix PVS/V560: allocator now never returns NULL
This commit is contained in:
parent
a2f9188418
commit
2940af8321
@ -1297,18 +1297,14 @@ recover_names (
|
|||||||
msg_putchar('\n');
|
msg_putchar('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Do the loop for every directory in 'directory'.
|
||||||
* Do the loop for every directory in 'directory'.
|
// First allocate some memory to put the directory name in.
|
||||||
* First allocate some memory to put the directory name in.
|
|
||||||
*/
|
|
||||||
dir_name = xmalloc(STRLEN(p_dir) + 1);
|
dir_name = xmalloc(STRLEN(p_dir) + 1);
|
||||||
dirp = p_dir;
|
dirp = p_dir;
|
||||||
while (dir_name != NULL && *dirp) {
|
while (*dirp) {
|
||||||
/*
|
// Isolate a directory name from *dirp and put it in dir_name (we know
|
||||||
* Isolate a directory name from *dirp and put it in dir_name (we know
|
// it is large enough, so use 31000 for length).
|
||||||
* it is large enough, so use 31000 for length).
|
// Advance dirp to next directory name.
|
||||||
* Advance dirp to next directory name.
|
|
||||||
*/
|
|
||||||
(void)copy_option_part(&dirp, dir_name, 31000, ",");
|
(void)copy_option_part(&dirp, dir_name, 31000, ",");
|
||||||
|
|
||||||
if (dir_name[0] == '.' && dir_name[1] == NUL) { /* check current dir */
|
if (dir_name[0] == '.' && dir_name[1] == NUL) { /* check current dir */
|
||||||
|
Loading…
Reference in New Issue
Block a user