buffer: refactor redeclared variables
authorRich Trott <rtrott@gmail.com>
Tue, 26 Jan 2016 21:17:31 +0000 (13:17 -0800)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
commit12a8427bab5316b44aa6f8026313026e2a76c40a
tree82aef03e63e0ed55b2974a256cb664ddb7467fd8
parent03944fe3e8bb5c827fb3cd2e43791adecaae0378
buffer: refactor redeclared variables

A handful of variable declarations in `lib/buffer.js` redeclare the same
variable in the same scope. This change removes each redeclaration by
switching to `const`, switching to `let`, or explicitly hoisting the
`var` declaration.

PR-URL: https://github.com/nodejs/node/pull/4886
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
lib/buffer.js