diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-03-31 13:47:06 +0300 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-04-05 12:37:02 +0300 |
commit | a7581d0859ce5139b2d7795c5ac1f8df0e85815c (patch) | |
tree | eeb93d30f9690d1ee6e96a46685574aeba25ca9d /src/node_lttng.cc | |
parent | 00c876dec54f9c515aeed78c75ce61a4e0206d95 (diff) |
src: replace ARRAY_SIZE with typesafe arraysize
To prevent `ARRAY_SIZE(&arg)` (i.e., taking the array size of a pointer)
from happening again.
PR-URL: https://github.com/nodejs/node/pull/5969
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_lttng.cc')
-rw-r--r-- | src/node_lttng.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_lttng.cc b/src/node_lttng.cc index b70f6ca8098..490beb6e400 100644 --- a/src/node_lttng.cc +++ b/src/node_lttng.cc @@ -248,7 +248,7 @@ void InitLTTNG(Environment* env, Local<Object> target) { #undef NODE_PROBE }; - for (unsigned int i = 0; i < ARRAY_SIZE(tab); i++) { + for (size_t i = 0; i < arraysize(tab); i++) { Local<String> key = OneByteString(env->isolate(), tab[i].name); Local<Value> val = env->NewFunctionTemplate(tab[i].func)->GetFunction(); target->Set(key, val); |