Skip to content

Comments

Style: ssl.h#4466

Closed
FdaSilvaYY wants to merge 2 commits intoopenssl:masterfrom
FdaSilvaYY:ssl_h_header_fix
Closed

Style: ssl.h#4466
FdaSilvaYY wants to merge 2 commits intoopenssl:masterfrom
FdaSilvaYY:ssl_h_header_fix

Conversation

@FdaSilvaYY
Copy link
Contributor

@FdaSilvaYY FdaSilvaYY commented Oct 4, 2017

fix some indents, and restrict to 80 cols some lines.

split from #4457 .

Checklist
  • documentation is added or updated
  • [N/A] tests are added or updated

Copy link
Contributor

@kaduk kaduk left a comment

Choose a reason for hiding this comment

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

There are several preprocessor statements that are longer than 80 columns, but since it is not always possible to handle those nicely I did not look at them too closely.

Copy link
Contributor

Choose a reason for hiding this comment

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

A style pass over ssl.h might reasonably be expected to normalize on one of ') (' or ')(' in function typedefs.
#2279 (comment) is perhaps in support of the latter (no space), but we've really been all over the place.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove the space.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

',' is in column 81

Copy link
Contributor Author

Choose a reason for hiding this comment

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

better fixed with a typedef on call_proc type.

Copy link
Contributor

Choose a reason for hiding this comment

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

Most of these deprecated version-specific methods have their comment extend past the 80th column

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not the most prominent style issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

column 81

Copy link
Contributor

Choose a reason for hiding this comment

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

column 81

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need an typedef on callback type to fully fix it ; in a next PR...

Copy link
Contributor

Choose a reason for hiding this comment

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

Column 92(!)

@FdaSilvaYY
Copy link
Contributor Author

FdaSilvaYY commented Oct 13, 2017

I was just trying to push attention on the various nits in this file.
Can you push this PR as it is ?
Else I will fix (or continue it) in a few weeks, as I'm currently far far away ... ;)

@kaduk
Copy link
Contributor

kaduk commented Oct 16, 2017

I couldn't push anything without an OMC code review. And this seems sufficiently non-urgent that continuing when you get back should be okay.

Copy link
Contributor

@richsalz richsalz left a comment

Choose a reason for hiding this comment

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

Do we need docs for the new typedefs?
Are the "convert to function typedefs" deliberately only partly done?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove the space.

Copy link
Contributor

Choose a reason for hiding this comment

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

and remove the spaces between the function name and the param lists here, and below, as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Too much too fix ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

all those function typedefs, and there isn't one here? :)

Copy link
Contributor Author

@FdaSilvaYY FdaSilvaYY Oct 31, 2017

Choose a reason for hiding this comment

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

I start these kind of changes on my git repo, as draft for a next PR.

@FdaSilvaYY FdaSilvaYY force-pushed the ssl_h_header_fix branch 3 times, most recently from 1d86007 to c9a3354 Compare November 5, 2017 20:53
@FdaSilvaYY FdaSilvaYY force-pushed the ssl_h_header_fix branch 2 times, most recently from d76a38b to bf7dc77 Compare November 26, 2017 19:48
@FdaSilvaYY FdaSilvaYY force-pushed the ssl_h_header_fix branch 2 times, most recently from 30263a8 to 3ab0412 Compare December 21, 2017 20:41
@mattcaswell mattcaswell added this to the 1.1.1 milestone Jan 24, 2018
@FdaSilvaYY
Copy link
Contributor Author

Fixed and rebased to current master.
Ping @openssl for review ; it is only style nits, no code change.

@kaduk
Copy link
Contributor

kaduk commented Mar 12, 2018

I'm not sure how much sense it makes to take a style change that is making changes to idioms not yet codified in the style guide (e.g., no space between return-type parens and function-arg parens for function typedefs). So maybe this should move to post-1.1.1?

@kaduk
Copy link
Contributor

kaduk commented Mar 12, 2018

I'm not sure how much sense it makes to take a style change that is making changes to idioms not yet codified in the style guide (e.g., no space between return-type parens and function-arg parens for function typedefs). So maybe this should move to post-1.1.1?

Okay, that is extremely funny given that I am the one who asked for the change in the first place. I guess I should look at the rest of the changes now

kaduk
kaduk previously requested changes Mar 12, 2018
Copy link
Contributor

@kaduk kaduk left a comment

Choose a reason for hiding this comment

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

Just one nit left that I see.

int op, int bits, int nid,
void *other, void *ex));
int (*SSL_get_security_callback(const SSL *s)) (const SSL *s, const SSL_CTX *
ctx, int op, int bits, int nid,
Copy link
Contributor

Choose a reason for hiding this comment

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

The ctx and its * should be adjacent, with no space or newline separating them.

const CTLOG_STORE *SSL_CTX_get0_ctlog_store(const SSL_CTX *ctx);

# endif /* OPENSSL_NO_CT */
# endif /* OPENSSL_NO_CT */
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be the only comment on #endif in the file; I almost wonder if it is "more consistent" with the current style to remove it than to reindent it.

Copy link
Contributor Author

@FdaSilvaYY FdaSilvaYY Mar 13, 2018

Choose a reason for hiding this comment

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

This change comes from the openssl-format-source tool. I don't know the reason/rule behind it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kaduk: I will be glad to remove it, if you say so.
On the other side, I'm for having this kind of comment when the length of this block exceeds the height of the screen ;)
I rebase these changes on a fresh master .

Copy link
Member

Choose a reason for hiding this comment

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

I think the comment should remain. I don't know why the tool reindented it. I think it looks better without the reindentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed and rebased to last master.

@FdaSilvaYY FdaSilvaYY force-pushed the ssl_h_header_fix branch 2 times, most recently from 796b21f to e3ea549 Compare March 14, 2018 18:15
@mattcaswell
Copy link
Member

@kaduk any more comments?

@kaduk
Copy link
Contributor

kaduk commented Mar 21, 2018

I probably won't get a chance to look again this week; let me dismiss my review at least for now.

@kaduk kaduk dismissed their stale review March 21, 2018 23:25

Additional changes intended to address my comments were made.

@FdaSilvaYY
Copy link
Contributor Author

@kaduk any more comments, or this PR is good to go with its two approvals ?

Copy link
Contributor

@kaduk kaduk left a comment

Choose a reason for hiding this comment

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

@kaduk any more comments, or this PR is good to go with its two approvals ?

Yes, but we should feel free to treat them as non-blocking.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can nestle the *ctx with no space between

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed !

Copy link
Contributor

Choose a reason for hiding this comment

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

I forget if the tooling complains if we nestle these together as int (*cb)(const

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't remember, I keep the original style; will be fixed later with a few typedef's function-pointer .

fix some indents, and restrict to 80 cols some lines.
@kaduk
Copy link
Contributor

kaduk commented Apr 9, 2018

(reconfirm +1)

@FdaSilvaYY
Copy link
Contributor Author

Ping @richsalz , @mattcaswell : little nudge for reconfirming and merge ;)

@richsalz
Copy link
Contributor

@mattcaswell you want to reconfirm, and possibly merge?

@FdaSilvaYY
Copy link
Contributor Author

Ping @richsalz , @mattcaswell this looks like it is lost in the limbo ? ;)

@richsalz
Copy link
Contributor

@mattcaswell or @kaduk should merge (I try to avoid overlap with co-workers).

@mattcaswell mattcaswell added the approval: done This pull request has the required number of approvals label Apr 18, 2018
@mattcaswell
Copy link
Member

Sorry for the delay. Pushed now. Thanks.

levitte pushed a commit that referenced this pull request Apr 18, 2018
fix some indents, and restrict to 80 cols some lines.

Reviewed-by: Ben Kaduk <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #4466)
@FdaSilvaYY FdaSilvaYY deleted the ssl_h_header_fix branch April 28, 2018 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants