Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer: remove unreachable code #12438

Closed
wants to merge 1 commit into from
Closed

Commits on Apr 16, 2017

  1. buffer: remove unreachable code

    46f202 introduced changes that cause a previously reachable error
    condition to be unreachable. Remove the code.
    
    The error condition checks that `byteLength()` doesn't return -1. But
    that will only happen if `byteLength()` receives an encoding that is
    falsy. However the call to `byteLength()` is in an `else` block that is
    only reachable if `encoding` is a string with a length greater than 0.
    So `byteLength()` will never return `-1` in this situation.
    Trott committed Apr 16, 2017
    Configuration menu
    Copy the full SHA
    e5d04e3 View commit details
    Browse the repository at this point in the history