From 0240eb99a29c3e3719f500040cb965d0d85f4734 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 16 Feb 2017 15:04:29 -0500 Subject: [PATCH] child_process: remove empty if condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit replaces an empty if-else-if with a single if condition. PR-URL: https://github.com/nodejs/node/pull/11427 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Santiago Gimeno --- lib/child_process.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 76ec6d3d0f9437..e5b35e7add952d 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -196,9 +196,7 @@ exports.execFile = function(file /*, args, options, callback*/) { stderr = Buffer.concat(_stderr); } - if (ex) { - // Will be handled later - } else if (code === 0 && signal === null) { + if (!ex && code === 0 && signal === null) { callback(null, stdout, stderr); return; }