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 Myles Borins committed Jul 14, 2016
1 parent 4748bed commit 68db091
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ template void SSLWrap<TLSWrap>::WaitForCertCb(CertCb cb, void* arg);


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
5 changes: 2 additions & 3 deletions src/spawn_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,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 @@ -989,8 +989,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 68db091

Please sign in to comment.