Subject: Re: bin/1470: ftp(1) prints bogus transfer times
To: None <current-users@NetBSD.ORG, tech-kern@NetBSD.ORG>
From: Danny Thomas <D.Thomas@vthrc.uq.edu.au>
List: tech-kern
Date: 09/18/1995 07:43:49
from netbsd-bugs@NetBSD.ORG
>        long bs;
>
>        if (verbose) {
>!               timersub(&td, t1, t0);
>                s = td.tv_sec + (td.tv_usec / 1000000.);
>  #define       nz(x)   ((x) == 0 ? 1 : (x))
>                bs = bytes / nz(s);
>--- 1162,1168 ----
>        long bs;
>
>        if (verbose) {
>!               timersub(t1, t0, &td);
>                s = td.tv_sec + (td.tv_usec / 1000000.);
>  #define       nz(x)   ((x) == 0 ? 1 : (x))
>                bs = bytes / nz(s);

seems like yet another bug -Wall would have caught.

of course -Wall doesn't catch serious bugs (algorithmic/race/...), but an
early investment in doing this would have been largely paid paid off during
the off_t transition.

Has Christos' work in this area been finished/committed?

cheers,
Danny Thomas  (D.Thomas@vthrc.uq.edu.au)