summaryrefslogtreecommitdiff
path: root/src/js_stream.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/js_stream.cc
parent00c876dec54f9c515aeed78c75ce61a4e0206d95 (diff)
downloadnode-new-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.tar.gz
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/js_stream.cc')
-rw-r--r--src/js_stream.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js_stream.cc b/src/js_stream.cc
index 25938f111b..e81709a805 100644
--- a/src/js_stream.cc
+++ b/src/js_stream.cc
@@ -75,7 +75,7 @@ int JSStream::DoShutdown(ShutdownWrap* req_wrap) {
req_wrap->Dispatched();
Local<Value> res =
- MakeCallback(env()->onshutdown_string(), ARRAY_SIZE(argv), argv);
+ MakeCallback(env()->onshutdown_string(), arraysize(argv), argv);
return res->Int32Value();
}
@@ -103,7 +103,7 @@ int JSStream::DoWrite(WriteWrap* w,
w->Dispatched();
Local<Value> res =
- MakeCallback(env()->onwrite_string(), ARRAY_SIZE(argv), argv);
+ MakeCallback(env()->onwrite_string(), arraysize(argv), argv);
return res->Int32Value();
}