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

Encompassing only entire statements and expressions with preprocessor conditionals. #465

Closed
wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 3, 2015

A suggestion to compile entire statements and expressions, as suggested by code style guidelines from the Linux Kernel and practitioners.

It might improve code understanding, maintainability and error-proneness.

@richsalz
Copy link
Contributor

richsalz commented Nov 3, 2015

this is a good idea, but stdbool and bool are not; use int.

@kaduk
Copy link
Contributor

kaduk commented Nov 3, 2015

Declaring variables at inner scope may or may not be a good idea, too. (Does the style guide address this question?)

@levitte
Copy link
Member

levitte commented Nov 3, 2015

Style wise, I don't think camelCase is seen in OpenSSL too often.

Regarding inner scope declaration, I don't see anything wrong with it. However having the same variable declared multiple times inside different branches of a preprocessor condition... Nah. Declare outside if the condition, assign inside.

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

4 participants