]> andersk Git - openssh.git/blobdiff - scp.c
- Merged OpenBSD CVS changes:
[openssh.git] / scp.c
diff --git a/scp.c b/scp.c
index a079d28ef4ddbd9bad0ad511f29657fd12ba1109..34f848e14743620dc4daa7243ef9e851fe386984 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -70,7 +70,7 @@ static struct timeval start;
 volatile unsigned long statbytes;
 
 /* Total size of current file. */
-unsigned long totalbytes = 0;
+off_t totalbytes = 0;
 
 /* Name of current file being transferred. */
 char *curfile;
@@ -1131,8 +1131,8 @@ progressmeter(int flag)
        }   
        (void)gettimeofday(&now, (struct timezone *)0);
        cursize = statbytes;
-       if ((totalbytes >> 10) != 0) {
-               ratio = (cursize >> 10) * 100 / (totalbytes >> 10);
+       if (totalbytes != 0) {
+               ratio = cursize * 100 / totalbytes;
                ratio = MAX(ratio, 0);
                ratio = MIN(ratio, 100);
        }
This page took 0.03882 seconds and 4 git commands to generate.