code cleanup

This commit is contained in:
Sebastian Hildebrandt
2021-01-26 10:57:12 +01:00
parent cb2c057294
commit 83d82875d4
6 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ function audio(callback) {
const parts = stdout.toString().split(/\n\s*\n/);
for (let i = 0; i < parts.length; i++) {
if (util.getValue(parts[i].split('\n'), 'name', '=')) {
result.push(parseWindowsAudio(parts[i].split('\n'), i));
result.push(parseWindowsAudio(parts[i].split('\n')));
}
}
}
+1 -1
View File
@@ -163,7 +163,7 @@ function bluetoothDevices(callback) {
const parts = stdout.toString().split(/\n\s*\n/);
for (let i = 0; i < parts.length; i++) {
if (util.getValue(parts[i].split('\n'), 'PNPClass', '=') === 'Bluetooth') {
result.push(parseWindowsBluetooth(parts[i].split('\n'), i));
result.push(parseWindowsBluetooth(parts[i].split('\n')));
}
}
}
+1 -1
View File
@@ -468,7 +468,7 @@ function parseLinesDarwinNics(sections) {
if (nic.speed === null) {
speed = util.getValue(section, 'uplink rate');
nic.speed = speed ? parseFloat(speed) : null;
if (nic.speed > null && speed.toLowerCase().indexOf('gbps') >= 0) {
if (nic.speed !== null && speed.toLowerCase().indexOf('gbps') >= 0) {
nic.speed = nic.speed * 1000;
}
} else {