Skip to content

Typo and style#4457

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

Typo and style#4457
FdaSilvaYY wants to merge 2 commits intoopenssl:masterfrom
FdaSilvaYY:typo_n_style

Conversation

@FdaSilvaYY
Copy link
Contributor

@FdaSilvaYY FdaSilvaYY commented Oct 3, 2017

Few fixes staging on my repo

Checklist
  • documentation is added or updated
  • tests are added or updated

@FdaSilvaYY FdaSilvaYY force-pushed the typo_n_style branch 3 times, most recently from cf094e1 to 3fa8867 Compare October 3, 2017 21:49
Copy link
Member

Choose a reason for hiding this comment

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

an efficient

Copy link
Contributor

Choose a reason for hiding this comment

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

This one seems like a matter of taste, but I don't really prefer one over the other, myself.

Copy link
Contributor Author

@FdaSilvaYY FdaSilvaYY Oct 4, 2017

Choose a reason for hiding this comment

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

'performant' is missing in various english dictionaries...

Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, the old form is surprising. I could understand breaking early to get 'data' and 'len' on the same line, but the old form seems to have not had any real benefit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert this chunk; SSL *s is the prevailing style here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, done.
I think (and wish) that one letter should be forbidden for non-POD type.
It 's a pain to track them in the code .
May be a future addition to Style Guideline ? ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

For these sort of callback getters, I'd almost consider a more radical solution that indents the getter arguments only a few columns more than, say, the start of the getter function name. But definitely wait for a second opinion before implementing that!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A better solution struct ssl_st* -> SSL* ...
plus a typedef on callback functions ...

I did not dig the origins of this kind of declarations ...

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the __owur addition was a little sloppy.

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 prefer to avoid splitting the type and name across lines like this.
Similar comments as to callback getters (above) apply, and I suppose we also retain the option of not specifying a name at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this going from column 79 to column 83?!

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 on my side.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we prefer to keep the )( nestled together for the function (type) arguments.
Also, no space in *ctx.

Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, this is the only instance in ssl.h of endif-with-comment.
I guess your change is consistent with ssl_locl.h, so I don't really have grounds to object.

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this trailing comma still column 81?

Copy link
Contributor Author

@FdaSilvaYY FdaSilvaYY Oct 4, 2017

Choose a reason for hiding this comment

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

yes it is ... jut one out, not the worst case of this file ;)

@FdaSilvaYY
Copy link
Contributor Author

Should I split out ssl.h corrections into his standalone PR to ease the Approval ?

@FdaSilvaYY FdaSilvaYY mentioned this pull request Oct 4, 2017
1 task
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.

Okay, the non-ssl.h changes look fine.

@FdaSilvaYY
Copy link
Contributor Author

Rebased to latest master

@FdaSilvaYY
Copy link
Contributor Author

Comments fixed, and PR rebased to last master.

Copy link
Member

Choose a reason for hiding this comment

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

nit pick. The comment needs to move one space to the right

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

@levitte levitte added the approval: done This pull request has the required number of approvals label Nov 7, 2017
@kaduk
Copy link
Contributor

kaduk commented Nov 7, 2017

reconfirm +1
I'll merge.

levitte pushed a commit that referenced this pull request Nov 7, 2017
Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Ben Kaduk <[email protected]>
(Merged from #4457)
levitte pushed a commit that referenced this pull request Nov 7, 2017
Reviewed-by: Richard Levitte <[email protected]>
Reviewed-by: Ben Kaduk <[email protected]>
(Merged from #4457)
@kaduk
Copy link
Contributor

kaduk commented Nov 7, 2017

Merged to master; closing

@kaduk kaduk closed this Nov 7, 2017
@FdaSilvaYY FdaSilvaYY deleted the typo_n_style branch November 7, 2017 20:37
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.

3 participants