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

openssl: remove bad gotos into other scope #16356

Closed
wants to merge 2 commits into from

Conversation

MarcelRaad
Copy link
Member

All the goto did in these cases was effectively return 0, so just
use that explicitly.

This avoids GCC warnings in addition to the MSVC warning.

@github-actions github-actions bot added the TLS label Feb 16, 2025
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Feb 16, 2025
All the `goto` did in these cases was effectively `return 0`, so just
use that explicitly.

Closes curl#16356
Comment on lines 1523 to 1524
if(!PKCS12_parse(p12, key_passwd, &pri, &x509,
&ca)) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if(!PKCS12_parse(p12, key_passwd, &pri, &x509,
&ca)) {
if(!PKCS12_parse(p12, key_passwd, &pri, &x509, &ca)) {

keep original line here? [nit]

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I just reverted the whole commit 3f79695. I can keep its formatting changes. Should I still leave git's default revert commit message untouched in this case?

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 that's fine, if you make a separate sub-commit to amend it. However you feel it's best, it's also fine to leave it as-is.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK thanks! I did that first, but the double-revert looked strange to me and therefore I amended the commit message instead.

This reverts the main part of commit
3f79695, but keeping the
formatting fix.

Closes curl#16356
All the `goto` did in these cases was effectively `return 0`, so just
use that explicitly.

Closes curl#16356
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Feb 17, 2025
This reverts the main part of commit
3f79695, but keeping the
formatting fix.

Closes curl#16356
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Feb 17, 2025
All the `goto` did in these cases was effectively `return 0`, so just
use that explicitly.

Closes curl#16356
MarcelRaad added a commit to MarcelRaad/curl that referenced this pull request Feb 17, 2025
All the `goto` did in these cases was effectively `return 0`, so just
use that explicitly.

Closes curl#16356
@MarcelRaad MarcelRaad deleted the remove_bad_goto branch February 17, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants