mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
refactor: change some xstrndup() and xstrnsave() to xmemdupz() (#25959)
When the given length is exactly the number of bytes to copy, xmemdupz() makes the intention clearer.
This commit is contained in:
@@ -4232,7 +4232,7 @@ static void nv_brackets(cmdarg_T *cap)
|
||||
clearop(cap->oap);
|
||||
} else {
|
||||
// Make a copy, if the line was changed it will be freed.
|
||||
ptr = xstrnsave(ptr, len);
|
||||
ptr = xmemdupz(ptr, len);
|
||||
find_pattern_in_path(ptr, 0, len, true,
|
||||
cap->count0 == 0 ? !isupper(cap->nchar) : false,
|
||||
(((cap->nchar & 0xf) == ('d' & 0xf))
|
||||
|
Reference in New Issue
Block a user