Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@basilisk0315
Copy link

This PR does some same refactoring of functions in strings.c to remove calls to STRLEN().

Specifically:
In vim_strsave_shellescape() a small cosmetic change.
In string_count() move the call to STRLEN() outside the while loop.
In copy_first_char_to_tv() change to return -1 on failure or the length of resulting v_string. Change string_filter_map() and string_reduce() to use the return value of copy_first_char_to_tv().
In blob_from_string() refactor to remove call to STRLEN().
In string_from_blob() call vim_strnsave() instead of vim_strsave().
In vim_snprintf_safelen() call vim_vsnprintf_typval() directly instead of vim_vsnprintf() which then calls vim_vsnprintf_typval().

Cheers
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant