-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor to remove STRLEN() part 6 #14796
Conversation
tagp.tagname); | ||
if (!do_search(NULL, '/', '/', pbuf, (long)1, | ||
if (!do_search(NULL, '/', '/', pbuf, len, (long)1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is len
used here? Shouldn't this be pbuflen
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created PR #14817 to correct this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I missed that during review.
Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 vim/vim@8c85a2a Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 vim/vim@8c85a2a Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 vim/vim@8c85a2a Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 vim/vim@8c85a2a Co-authored-by: John Marriott <basilisk@internode.on.net>
Problem: too many strlen() calls in search.c Solution: refactor code and remove more strlen() calls, use explicit variable to remember strlen (John Marriott) closes: vim/vim#14796 vim/vim@8c85a2a Co-authored-by: John Marriott <basilisk@internode.on.net>
This PR reduces the number of calls to STRLEN() in search.c. There is nothing tricky here but because all of the call sites needed to change, there are 15 source files involved.
Cheers
John