From 657cd2c4e5940d32883a6791be41978a6d07afb8 Mon Sep 17 00:00:00 2001 From: Thom Seddon Date: Tue, 28 Jan 2014 16:18:36 +0000 Subject: [PATCH] lib: fix unnecessary coercion in lib/net.js Original patch by @skypjack in #6627 --- lib/net.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net.js b/lib/net.js index 8e6dcbf7bf..3d0fe6941e 100644 --- a/lib/net.js +++ b/lib/net.js @@ -784,7 +784,7 @@ function connect(self, address, port, addressType, localAddress) { var err; if (localAddress) { - if (addressType == 6) { + if (addressType === 6) { err = self._handle.bind6(localAddress); } else { err = self._handle.bind(localAddress); @@ -1020,7 +1020,7 @@ var createServerHandle = exports._createServerHandle = handle.writable = true; return handle; - } else if (port == -1 && addressType == -1) { + } else if (port === -1 && addressType === -1) { handle = createPipe(); if (process.platform === 'win32') { var instances = parseInt(process.env.NODE_PENDING_PIPE_INSTANCES); @@ -1034,7 +1034,7 @@ var createServerHandle = exports._createServerHandle = if (address || port) { debug('bind to ' + address); - if (addressType == 6) { + if (addressType === 6) { err = handle.bind6(address, port); } else { err = handle.bind(address, port);