NetBSD Problem Report #1470
From gnats Sat Sep 16 11:11:58 1995
Received: from forte.mathematik.uni-Bremen.de (thomas@forte.mathematik.uni-bremen.de [134.102.232.1]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id LAA00518 for <gnats-bugs@gnats.netbsd.org>; Sat, 16 Sep 1995 11:11:56 -0400
Message-Id: <199509161515.RAA12915@forte.mathematik.uni-Bremen.de>
Date: Sat, 16 Sep 1995 17:15:03 +0200
From: thomas@mathematik.uni-Bremen.de
Reply-To: thomas@mathematik.uni-Bremen.de
To: gnats-bugs@gnats.netbsd.org
Subject: ftp(1) prints bogus transfer times
X-Send-Pr-Version: 3.2
>Number: 1470
>Category: bin
>Synopsis: ftp(1) prints bogus transfer times
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 16 11:20:02 +0000 1995
>Closed-Date: Tue Sep 19 08:56:09 +0000 1995
>Last-Modified: Tue Sep 19 09:06:40 +0000 1995
>Originator: Thomas Eberhardt
>Release: NetBSD-current 950916
>Organization:
CeVis, University of Bremen, Germany
>Environment:
System: NetBSD ed209 1.0A NetBSD 1.0A (ED209) #2: Fri Sep 15 21:42:35 MET DST 1995 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386
Machine: i386
>Description:
ftp(1) uses timersub with arguments in the wrong order which
causes bogus transfer times to be printed.
>How-To-Repeat:
>Fix:
*** usr.bin/ftp/ftp.c- Tue Sep 12 09:12:17 1995
--- usr.bin/ftp/ftp.c Sat Sep 16 16:40:03 1995
***************
*** 1162,1168 ****
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);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: pk
State-Changed-When: Tue Sep 19 04:56:09 EDT 1995
State-Changed-Why:
bug corrected.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.