Commit a011c324 authored by Sakthipriyan Vairamani's avatar Sakthipriyan Vairamani Committed by Trevor Norris
Browse files

fs: minor refactoring

1. Remove a few unnecessary variables to reduce LoC.

2. Remove redundant `var` definitions of variables in same function.

3. Refactor variables which are defined inside a block and used outside
as well.

4. Refactor effect-less code.

5. In `rethrow` function, instead of assigning to `err` and throwing
`err` directly throw `backtrace` object.

6. Reassign a defined parameter while also mentioning arguments in the
body is one of the optimization killers. So, changing `callback` to
`callback_` and declaring a new variable called `callback` in the body.

PR-URL: https://github.com/nodejs/io.js/pull/1870


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent 8841132f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment