Skip to content

Commit 367c1b7

Browse files
committed
replaced tabs with spaces
1 parent 86c98c3 commit 367c1b7

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

sonar.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ var sonar = {
149149

150150
for( var tmp = 0; tmp < 4; tmp++ ) {
151151

152-
// Calculate the number of bits that change of the current part
153-
if ( range > 8 + 8 * tmp){
154-
r = 0;
155-
} else {
156-
r = 8 - (range - tmp * 8);
157-
}
152+
// Calculate the number of bits that change of the current part
153+
if ( range > 8 + 8 * tmp){
154+
r = 0;
155+
} else {
156+
r = 8 - (range - tmp * 8);
157+
}
158158

159159
// Calculate minimum and maximum of IP range for the current part
160160
ip_min[tmp] = ip_parts[tmp] & (255 << r);
@@ -169,26 +169,26 @@ var sonar = {
169169
// Queue IP address range
170170
ip_parts[3] = ip_min[3] + 1;
171171
for( ip_parts[0] = ip_min[0]; ip_parts[0] <= ip_max[0]; ip_parts[0]++ ) {
172-
if ( ip_parts[0] == ip_max[0] ){ // Check if we are approaching the end of the subnet
173-
var ae = 1;
174-
}
175-
for( ip_parts[1] = ip_min[1]; ip_parts[1] <= ip_max[1]; ip_parts[1]++ ) {
176-
if ( ae == 1 && ip_parts[1] == ip_max[1] ){
177-
var be = 1;
178-
}
179-
for( ip_parts[2] = ip_min[2]; ip_parts[2] <= ip_max[2]; ip_parts[2]++ ) {
180-
if ( be == 1 && ip_parts[2] == ip_max[2] ){
181-
ip_max[3]--; // Prevent the broadcast address from getting queued
182-
}
183-
while( ip_parts[3] <= ip_max[3] ) {
184-
var tmp_ip = ip_parts[0] + '.' + ip_parts[1] + '.' + ip_parts[2] + '.' + ip_parts[3];
185-
sonar.ip_queue.push( tmp_ip );
186-
ip_parts[3]++;
187-
}
188-
ip_parts[3] = ip_min[3];
189-
}
190-
}
191-
}
172+
if ( ip_parts[0] == ip_max[0] ){ // Check if we are approaching the end of the subnet
173+
var ae = 1;
174+
}
175+
for( ip_parts[1] = ip_min[1]; ip_parts[1] <= ip_max[1]; ip_parts[1]++ ) {
176+
if ( ae == 1 && ip_parts[1] == ip_max[1] ){
177+
var be = 1;
178+
}
179+
for( ip_parts[2] = ip_min[2]; ip_parts[2] <= ip_max[2]; ip_parts[2]++ ) {
180+
if ( be == 1 && ip_parts[2] == ip_max[2] ){
181+
ip_max[3]--; // Prevent the broadcast address from getting queued
182+
}
183+
while( ip_parts[3] <= ip_max[3] ) {
184+
var tmp_ip = ip_parts[0] + '.' + ip_parts[1] + '.' + ip_parts[2] + '.' + ip_parts[3];
185+
sonar.ip_queue.push( tmp_ip );
186+
ip_parts[3]++;
187+
}
188+
ip_parts[3] = ip_min[3];
189+
}
190+
}
191+
}
192192
},
193193

194194
/*

0 commit comments

Comments
 (0)