mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48: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:
@@ -635,7 +635,7 @@ static int expand_set_opt_listflag(optexpand_T *args, char *flags, int *numMatch
|
||||
// existing flag. Just skip it to avoid duplicate.
|
||||
continue;
|
||||
}
|
||||
(*matches)[count++] = xstrnsave(flag, 1);
|
||||
(*matches)[count++] = xmemdupz(flag, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user