Commit 50a1bacd authored by Mike Hibler's avatar Mike Hibler

nits:

	weren't counting all the free ranges in some cases
	didn't track min/max correctly (duh!)
parent 3faa99ad
...@@ -353,9 +353,18 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex) ...@@ -353,9 +353,18 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex)
"lastsect value (%u<%u)\n", "lastsect value (%u<%u)\n",
chunkno, hdr->lastsect, chunkno, hdr->lastsect,
reg->start + reg->size); reg->start + reg->size);
else else {
if (count > 0) {
sectfree += count;
if (count < fmin)
fmin = count;
if (count > fmax)
fmax = count;
franges++;
}
count = hdr->lastsect - count = hdr->lastsect -
(reg->start+reg->size); (reg->start+reg->size);
}
} }
} else } else
count = reg->start - nextsector; count = reg->start - nextsector;
...@@ -363,7 +372,7 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex) ...@@ -363,7 +372,7 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex)
sectfree += count; sectfree += count;
if (count < fmin) if (count < fmin)
fmin = count; fmin = count;
else if (count > fmax) if (count > fmax)
fmax = count; fmax = count;
franges++; franges++;
} }
...@@ -372,7 +381,7 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex) ...@@ -372,7 +381,7 @@ dumpchunk(char *name, char *buf, int chunkno, int checkindex)
sectinuse += count; sectinuse += count;
if (count < amin) if (count < amin)
amin = count; amin = count;
else if (count > amax) if (count > amax)
amax = count; amax = count;
if (count < 8) if (count < 8)
adist[0]++; adist[0]++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment