Skip to content
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

Remove nonstandard string function #33456

Merged
merged 1 commit into from
Aug 22, 2019
Merged

Conversation

kevingranade
Copy link
Member

Summary

SUMMARY: None

Purpose of change

Fixes #22443
strnlen is not part of the c++ standard and impairs portability.

Describe the solution

Just use strlen.
Also remove some egregious auto.

Strnlen isn't technically part ofvthe standard, so it imp as its portability and brings minimal robustness here.
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Aug 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit 2cce782 into master Aug 22, 2019
@kevingranade kevingranade deleted the kevingranade-no-strnlen branch August 29, 2019 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strnlen Compilation problem [COMPILE,CLANG]
2 participants