mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
src: fix readability/nolint cpplint warnings
PR-URL: https://github.com/nodejs/node/pull/7462 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This commit is contained in:
1 parent
0ba0eca986
commit
d112df4a26
2 files changed
+4
-5
No files matched your search
+2
-2
@@ -175,7 +175,7 @@ template int SSLWrap<TLSWrap>::SelectALPNCallback(
|
||||
#endif // TLSEXT_TYPE_application_layer_protocol_negotiation
|
||||
|
||||
static void crypto_threadid_cb(CRYPTO_THREADID* tid) {
|
||||
static_assert(sizeof(uv_thread_t) <= sizeof(void*), // NOLINT(runtime/sizeof)
|
||||
static_assert(sizeof(uv_thread_t) <= sizeof(void*),
|
||||
"uv_thread_t does not fit in a pointer");
|
||||
CRYPTO_THREADID_set_pointer(tid, reinterpret_cast<void*>(uv_thread_self()));
|
||||
}
|
||||
@@ -693,7 +693,7 @@ void SecureContext::AddCACert(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
unsigned cert_count = 0;
|
||||
if (BIO* bio = LoadBIO(env, args[0])) {
|
||||
while (X509* x509 = // NOLINT(whitespace/if-one-line)
|
||||
while (X509* x509 =
|
||||
PEM_read_bio_X509(bio, nullptr, CryptoPemCallback, nullptr)) {
|
||||
X509_STORE_add_cert(sc->ca_store_, x509);
|
||||
SSL_CTX_add_client_CA(sc->ctx_, x509);
|
||||
|
||||
+2
-3
@@ -992,7 +992,7 @@ int SyncProcessRunner::CopyJsStringArray(Local<Value> js_value,
|
||||
data_size = 0;
|
||||
for (uint32_t i = 0; i < length; i++) {
|
||||
data_size += StringBytes::StorageSize(isolate, js_array->Get(i), UTF8) + 1;
|
||||
data_size = ROUND_UP(data_size, sizeof(void*)); // NOLINT(runtime/sizeof)
|
||||
data_size = ROUND_UP(data_size, sizeof(void*));
|
||||
}
|
||||
|
||||
buffer = new char[list_size + data_size];
|
||||
@@ -1008,8 +1008,7 @@ int SyncProcessRunner::CopyJsStringArray(Local<Value> js_value,
|
||||
js_array->Get(i),
|
||||
UTF8);
|
||||
buffer[data_offset++] = '\0';
|
||||
data_offset = ROUND_UP(data_offset,
|
||||
sizeof(void*)); // NOLINT(runtime/sizeof)
|
||||
data_offset = ROUND_UP(data_offset, sizeof(void*));
|
||||
}
|
||||
|
||||
list[length] = nullptr;
|
||||
|
||||
Reference in new issue
Block a user