diff options
author | 1999-11-24 20:26:35 +0000 | |
---|---|---|
committer | 1999-11-24 20:26:35 +0000 | |
commit | db83f53b9c29cbab7658d17f85d3f32d3baf8e91 (patch) | |
tree | 6d6836670aa7cc80162b270cfa372d4a48dd8ddd /usr.bin/ssh/scp.c | |
parent | remove dead #ifdef-0-code (diff) | |
download | wireguard-openbsd-db83f53b9c29cbab7658d17f85d3f32d3baf8e91.tar.xz wireguard-openbsd-db83f53b9c29cbab7658d17f85d3f32d3baf8e91.zip |
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 |