Skip to content

Conversation

@richsalz
Copy link
Contributor

@richsalz richsalz commented Dec 7, 2017

Spurred by the recent bug that had the "-1" inside the sizeof argument, this PR fixes all uses of sizeof to be conformant with our style guide. Not going to cherry-pick back; I could do separate PR's for the other branches if someone feels strongly about wanting it.

@richsalz richsalz added branch: master Applies to master branch approval: review pending This pull request needs review by a committer labels Dec 7, 2017
@richsalz richsalz self-assigned this Dec 7, 2017
levitte
levitte previously requested changes Dec 7, 2017
Copy link
Member

@levitte levitte left a comment

Choose a reason for hiding this comment

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

I've said it before, please avoid "sliding in" spurious changes of this sort.

Copy link
Member

Choose a reason for hiding this comment

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

That cast should not be part of this PR. They are also a subject of discussion, and should not be added spuriously.

Copy link
Member

Choose a reason for hiding this comment

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

Remove the cast

Copy link
Member

Choose a reason for hiding this comment

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

Remove the cast

Copy link
Member

Choose a reason for hiding this comment

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

Remove the cast

@richsalz
Copy link
Contributor Author

richsalz commented Dec 7, 2017

Actually, in all four of those cases the cast is safe and correct because it is the size of an on-stack 8K buffer. But I removed them because it's not relevant to the main point of this PR. Thanks for the nudge. updating commit pushed.

@richsalz richsalz dismissed levitte’s stale review December 7, 2017 19:07

Requested changes made.

Copy link
Member

@levitte levitte 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 should be backported, at least to 1.1.0. Otherwise, we risk paying hell (i.e. merge conflicts) later on with other changes in the same general areas.

@richsalz richsalz added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Dec 7, 2017
levitte pushed a commit that referenced this pull request Dec 8, 2017
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from #4872)
@dot-asm
Copy link
Contributor

dot-asm commented Dec 8, 2017

This is apparently committed already, so it should be closed... Right?

@dot-asm dot-asm closed this Dec 8, 2017
@richsalz richsalz deleted the sizeof-parens branch December 8, 2017 13:31
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 branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants