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

Since the string from strerror should never be modified, use const. #202

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

Conversation

spth
Copy link

@spth spth commented Oct 14, 2020

This is just a very minor issue.

megaglest contains some calls to strerror where the result is assigned to a char *. However, according to the strerror specification, the string returned by strerror should never be changed, so I think it would be better to use const char * instead.

Philipp

Copy link
Contributor

@Jammyjamjamman Jammyjamjamman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks ok to merge.

@AndyMender
Copy link

I think it's a good idea to use const and constexpr wherever possible, both as a nod to other developers and a safety net for vars which shouldn't change :).

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.

None yet

3 participants