mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
refactor(options): always allocate option values (#30917)
Instead of keeping `P_ALLOCED` and `P_DEF_ALLOCED` flags to check if an option value is allocated, always allocate option values to simplify the logic. Ref: #25672
This commit is contained in:
@@ -250,7 +250,6 @@ void check_buf_options(buf_T *buf)
|
||||
/// Free the string allocated for an option.
|
||||
/// Checks for the string being empty_string_option. This may happen if we're out of memory,
|
||||
/// xstrdup() returned NULL, which was replaced by empty_string_option by check_options().
|
||||
/// Does NOT check for P_ALLOCED flag!
|
||||
void free_string_option(char *p)
|
||||
{
|
||||
if (p != empty_string_option) {
|
||||
|
Reference in New Issue
Block a user