We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ee6e91 commit 6ffa012Copy full SHA for 6ffa012
src/crypto/crypto_bio.cc
@@ -226,15 +226,14 @@ const BIO_METHOD* NodeBIO::GetMethod() {
226
// Static initialization ensures that this is safe to use concurrently.
227
static const BIO_METHOD* method = [&]() {
228
BIO_METHOD* method = BIO_meth_new(BIO_TYPE_MEM, "node.js SSL buffer");
229
- if (method != nullptr) {
230
- BIO_meth_set_write(method, Write);
231
- BIO_meth_set_read(method, Read);
232
- BIO_meth_set_puts(method, Puts);
233
- BIO_meth_set_gets(method, Gets);
234
- BIO_meth_set_ctrl(method, Ctrl);
235
- BIO_meth_set_create(method, New);
236
- BIO_meth_set_destroy(method, Free);
237
- }
+ CHECK_NOT_NULL(method);
+ BIO_meth_set_write(method, Write);
+ BIO_meth_set_read(method, Read);
+ BIO_meth_set_puts(method, Puts);
+ BIO_meth_set_gets(method, Gets);
+ BIO_meth_set_ctrl(method, Ctrl);
+ BIO_meth_set_create(method, New);
+ BIO_meth_set_destroy(method, Free);
238
return method;
239
}();
240
0 commit comments