| Summary: | show more precision in fetch % complete | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Greg Moncreaff <moncrg> | ||||
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Greg Moncreaff
2001-10-07 05:20:01 UTC
Responsible Changed From-To: freebsd-bugs->des fetch(1) is mine. Greg Moncreaff <moncrg@ma.ultranet.com> writes: > @@ -129,8 +129,8 @@ > if (xs->size <= 0) > fprintf(stderr, ": %lld bytes", xs->rcvd); > else > - fprintf(stderr, " (%lld bytes): %d%%", xs->size, > - (int)((100.0 * xs->rcvd) / xs->size)); > + fprintf(stderr, " (%lld bytes): %3.1f%%", xs->size, > + (float)((100.0 * xs->rcvd) / xs->size)); > } The cast to float is not only unnecessary but meaningless, since fprintf() is a vararg function, which means that the float is promoted back to double anyway. The width specifier in the format string is also unnecessary. DES -- Dag-Erling Smorgrav - des@ofug.org State Changed From-To: open->closed I'd rather keep it the way it is. Fetch already has a SIGINFO handler for the impatient. |