diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-24 20:26:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-24 20:26:36 +0000 |
commit | d144f2a6a459e7ad03f559f28280461ccb4148f4 (patch) | |
tree | 2f3683b5f8ac8ac6ae7d9d5eab7e7b47253288ce /usr.bin/ssh/scp.c | |
parent | 7d07feaee38c5b5bf979e63f3a66b7c8a53de734 (diff) |
progress meter overflow fix from damien@ibs.com.au
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r-- | usr.bin/ssh/scp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index d046409593a..39a371dfcfc 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -45,7 +45,7 @@ */ #include "includes.h" -RCSID("$Id: scp.c,v 1.20 1999/11/24 19:53:50 markus Exp $"); +RCSID("$Id: scp.c,v 1.21 1999/11/24 20:26:35 markus Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -974,7 +974,7 @@ run_err(const char *fmt,...) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scp.c,v 1.20 1999/11/24 19:53:50 markus Exp $ + * $Id: scp.c,v 1.21 1999/11/24 20:26:35 markus Exp $ */ char * @@ -1146,7 +1146,7 @@ progressmeter(int flag) (void) gettimeofday(&now, (struct timezone *) 0); cursize = statbytes; if (totalbytes != 0) { - ratio = cursize * 100 / totalbytes; + ratio = 100.0 * cursize / totalbytes; ratio = MAX(ratio, 0); ratio = MIN(ratio, 100); } else |