summaryrefslogtreecommitdiff
path: root/src/node_zlib.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2016-03-31 12:47:06 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2016-04-05 11:37:02 +0200
commita7581d0859ce5139b2d7795c5ac1f8df0e85815c (patch)
treeeeb93d30f9690d1ee6e96a46685574aeba25ca9d /src/node_zlib.cc
parent00c876dec54f9c515aeed78c75ce61a4e0206d95 (diff)
downloadandroid-node-v8-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.tar.gz
android-node-v8-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.tar.bz2
android-node-v8-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.zip
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_zlib.cc')
-rw-r--r--src/node_zlib.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index d84344228e..4bf5cc76ba 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -332,7 +332,7 @@ class ZCtx : public AsyncWrap {
// call the write() cb
Local<Value> args[2] = { avail_in, avail_out };
- ctx->MakeCallback(env->callback_string(), ARRAY_SIZE(args), args);
+ ctx->MakeCallback(env->callback_string(), arraysize(args), args);
ctx->Unref();
if (ctx->pending_close_)
@@ -354,7 +354,7 @@ class ZCtx : public AsyncWrap {
OneByteString(env->isolate(), message),
Number::New(env->isolate(), ctx->err_)
};
- ctx->MakeCallback(env->onerror_string(), ARRAY_SIZE(args), args);
+ ctx->MakeCallback(env->onerror_string(), arraysize(args), args);
// no hope of rescue.
if (ctx->write_in_progress_)