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
Various code fixes #1168
Various code fixes #1168
Conversation
75adee3
to
eaddb2f
Compare
@@ -45,22 +45,21 @@ int BIO_set(BIO *bio, const BIO_METHOD *method) | |||
bio->references = 1; | |||
bio->num_read = 0L; | |||
bio->num_write = 0L; | |||
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data)) | |||
return 0; | |||
|
|||
bio->lock = CRYPTO_THREAD_lock_new(); |
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.
one thing to consider is have a static BIO object with initializers and then do an assignment, to get the initializatoin. If not that, then just doing memset() and setting the non-zero pointers is better. while you're in this part of the code.
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 don't understand the code-meaning of your 1st sentence.
Will reading this code, I also think that the initialisation code should be moved to BIO_new().
Let's do it...
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.
static BIO nilb = { 0, 0, 0, -1L, 0, 0, …. Etc }
*b = nil;
37ba2a7
to
c165cc2
Compare
61ec7a8
to
e622b05
Compare
a9950dc
to
4edbdfc
Compare
4edbdfc
to
2e4f06d
Compare
2e4f06d
to
3ec9891
Compare
+1 |
merged, thanks. |
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #1168)
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #1168)
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #1168)
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #1168)
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from #1168)
I push a large code change out of this PR, to minimize the review work to do .