Skip to content

openssl: remove bad gotos into other scope#16356

Closed
MarcelRaad wants to merge 2 commits intocurl:masterfrom
MarcelRaad:remove_bad_goto
Closed

openssl: remove bad gotos into other scope#16356
MarcelRaad wants to merge 2 commits intocurl:masterfrom
MarcelRaad:remove_bad_goto

Conversation

@MarcelRaad
Copy link
Copy Markdown
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 thread lib/vtls/openssl.c Outdated
Comment on lines +1523 to +1524
if(!PKCS12_parse(p12, key_passwd, &pri, &x509,
&ca)) {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
This reverts the main part of commit
3f79695, but keeping the
formatting fix.

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

Closes curl#16356
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