-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 goto
s into other scope
#16356
Conversation
All the `goto` did in these cases was effectively `return 0`, so just use that explicitly. Closes curl#16356
6ba2545
to
49b9576
Compare
lib/vtls/openssl.c
Outdated
if(!PKCS12_parse(p12, key_passwd, &pri, &x509, | ||
&ca)) { |
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(!PKCS12_parse(p12, key_passwd, &pri, &x509, | |
&ca)) { | |
if(!PKCS12_parse(p12, key_passwd, &pri, &x509, &ca)) { |
keep original line here? [nit]
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.
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?
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.
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.
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.
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
49b9576
to
7a51d08
Compare
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
All the `goto` did in these cases was effectively `return 0`, so just use that explicitly. Closes curl#16356
All the
goto
did in these cases was effectivelyreturn 0
, so justuse that explicitly.
This avoids GCC warnings in addition to the MSVC warning.