From ab982e7fd1660203ff7c6c70a8435ba676e149ec 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 ea4dd7e3a71097..e952c439677a3f 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -187,9 +187,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; }