From b35b851a85a260f93411314711fa6d166ac31760 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 2 Feb 2020 16:18:26 +0100 Subject: [PATCH] code cleanup --- lib/network.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/network.js b/lib/network.js index f25556f..9888ea8 100644 --- a/lib/network.js +++ b/lib/network.js @@ -505,7 +505,7 @@ function getLinuxDHCPNics() { const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n'); lines.forEach(line => { const parts = line.replace(/\s+/g, ' ').trim().split(' '); - if (parts.length >=4) { + if (parts.length >= 4) { if (line.toLowerCase().indexOf(' inet ') >= 0 && line.toLowerCase().indexOf('dhcp') >= 0) { result.push(parts[1]); } @@ -549,13 +549,13 @@ function getLinuxIfaceDHCPstatus(iface, connectionName, DHCPNics) { let dhcStatus = resultFormat.split(' ').slice(1).toString(); switch (dhcStatus) { - case 'auto': - result = true; - break; + case 'auto': + result = true; + break; - default: - result = false; - break; + default: + result = false; + break; } return result; } catch (e) {