From e911ec0bfe57099b8f78b91907456517521129af Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 30 Jan 1997 03:36:26 +0000 Subject: [PATCH] Don't try to divide by zero in progressmeter(). From Thorsten Frueauf , PR #3160. --- usr.bin/ftp/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index 0f9b23a048a9..79f6829fa4a4 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.1 1997/01/19 14:19:17 lukem Exp $ */ +/* $NetBSD: util.c,v 1.2 1997/01/30 03:36:26 thorpej Exp $ */ /* * Copyright (c) 1985, 1989, 1993, 1994 @@ -34,7 +34,7 @@ */ #ifndef lint -static char rcsid[] = "$NetBSD: util.c,v 1.1 1997/01/19 14:19:17 lukem Exp $"; +static char rcsid[] = "$NetBSD: util.c,v 1.2 1997/01/30 03:36:26 thorpej Exp $"; #endif /* not lint */ /* @@ -402,7 +402,7 @@ progressmeter(flag) if (flag < 0) (void) gettimeofday(&start, (struct timezone *)0); - if (!progress || filesize < 0) + if (!progress || filesize <= 0) return; if (flag < 0) { before.tv_sec = -1;