summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-12 16:28:02 +1100
committerDamien Miller <djm@mindrot.org>1999-11-12 16:28:02 +1100
commit9c8da3ce326459a355643c0b332a3cc1db9ef5b5 (patch)
tree9b304a77a0480ebec1040c7d104fa4b6ff2af2ff /scp.c
parent7df20e2ffc56ac5356ea13f115b6191577261ef5 (diff)
Fix division-by-zero error
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scp.c b/scp.c
index d31eb5cb..95160e81 100644
--- a/scp.c
+++ b/scp.c
@@ -42,11 +42,11 @@ and ssh has the necessary privileges.)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scp.c,v 1.4 1999/11/11 10:39:50 damien Exp $
+ * $Id: scp.c,v 1.5 1999/11/12 05:28:02 damien Exp $
*/
#include "includes.h"
-RCSID("$Id: scp.c,v 1.4 1999/11/11 10:39:50 damien Exp $");
+RCSID("$Id: scp.c,v 1.5 1999/11/12 05:28:02 damien Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -976,7 +976,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.4 1999/11/11 10:39:50 damien Exp $
+ * $Id: scp.c,v 1.5 1999/11/12 05:28:02 damien Exp $
*/
char *
@@ -1131,7 +1131,7 @@ progressmeter(int flag)
}
(void)gettimeofday(&now, (struct timezone *)0);
cursize = statbytes;
- if (totalbytes != 0) {
+ if ((totalbytes >> 10) != 0) {
ratio = (cursize >> 10) * 100 / (totalbytes >> 10);
ratio = MAX(ratio, 0);
ratio = MIN(ratio, 100);