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

replace strncmp calls with static size, replace single char compare #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jan200101
Copy link
Contributor

calls like strncmp(osname, "Alpine Linux", 12) end up being more work than they are worth and getting the length of the const string should be gathered at compile time.

instances of strncmp with a size of 1 were simple replace with a compare, if the logic around it ensures that the pointer will not be out of bounds.

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