mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +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:
@@ -586,7 +586,7 @@ wingotofile:
|
||||
}
|
||||
|
||||
// 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, Prenum == 0,
|
||||
type, Prenum1, ACTION_SPLIT, 1, MAXLNUM);
|
||||
|
Reference in New Issue
Block a user