From 818cef848e2a4ffe39a478649217181afc561089 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 ad8842e520c3be..5e37c81a1e0c33 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -191,9 +191,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; }