Skip to content

Commit 6ffa012

Browse files
committed
fixup! Use CHECK_NOT_NULL()
1 parent 3ee6e91 commit 6ffa012

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/crypto/crypto_bio.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,14 @@ const BIO_METHOD* NodeBIO::GetMethod() {
226226
// Static initialization ensures that this is safe to use concurrently.
227227
static const BIO_METHOD* method = [&]() {
228228
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-
}
229+
CHECK_NOT_NULL(method);
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);
238237
return method;
239238
}();
240239

0 commit comments

Comments
 (0)