mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 00:02:06 +01:00
Minor code improvements in DNSutil
This commit is contained in:
parent
b343b499b5
commit
24bbe63da1
1 changed files with 4 additions and 2 deletions
|
@ -250,14 +250,16 @@ public class DNSUtil {
|
|||
List<SRVRecord> bucket = buckets.get(priority);
|
||||
int bucketSize;
|
||||
while ((bucketSize = bucket.size()) > 0) {
|
||||
int[] totals = new int[bucket.size()];
|
||||
int[] totals = new int[bucketSize];
|
||||
int running_total = 0;
|
||||
int count = 0;
|
||||
int zeroWeight = 1;
|
||||
|
||||
for (SRVRecord r : bucket) {
|
||||
if (r.getWeight() > 0)
|
||||
if (r.getWeight() > 0) {
|
||||
zeroWeight = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (SRVRecord r : bucket) {
|
||||
|
|
Loading…
Reference in a new issue