-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
crypto: replace gotos #23132
crypto: replace gotos #23132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone is feeling adventurous: I'd be curious to know if the custom handshake parser still wins out from openssl.
This conflicts with #23014. I kind of like this variant better, but I can close it if others don't feel the same. I'd prefer to use |
@tniessen - I was excited by the power of combining scoped variables. destructors and lambda, to tidy up the code and probably bring-in some functional programming elements to it when I developed #23014 . To me, other than the fact that the trapped object being destructed when leaving the scope (and leverage that destructor to run custom task on return), I don't see any connection with resource clean-up here. If you think this is more readable and efficient, I am not objecting. thanks! |
158c3eb
to
0120eb1
Compare
Rebased, old HEAD was 158c3eb063ba9983dfaca0067bf87455000f695e. @gireeshpunathil Thanks. I still liked your PR, I even approved it, I just forgot about it when I opened this one. |
Landed in 640172d, thanks for reviewing. |
PR-URL: #23132 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #23132 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
These occurrences of
goto
are almost trivial and only end up callingEnd()
. I personally don't think it makes the code less expressive, but I'd like to know if someone feels different.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes