Skip to content

Commit

Permalink
src: fix readability/nolint cpplint warnings
Browse files Browse the repository at this point in the history
PR-URL: #7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
  • Loading branch information
bnoordhuis authored and Fishrock123 committed Jul 5, 2016
1 parent 43e8357 commit 1fa6dba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/node_crypto.cc
Expand Up @@ -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()));
}
Expand Down Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions src/spawn_sync.cc
Expand Up @@ -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];
Expand All @@ -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;
Expand Down

0 comments on commit 1fa6dba

Please sign in to comment.