diff options
author | des <des@FreeBSD.org> | 2002-12-14 13:38:49 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-12-14 13:38:49 +0000 |
commit | bb06b52b0632f19a73137c352fe34ba856bcef87 (patch) | |
tree | ddc085aeca7650b68257793aa90458589dc5f3e4 /crypto | |
parent | 6f784b854cab669d46feb316fa7b22ee8a2d8c53 (diff) | |
download | FreeBSD-src-bb06b52b0632f19a73137c352fe34ba856bcef87.zip FreeBSD-src-bb06b52b0632f19a73137c352fe34ba856bcef87.tar.gz |
Fix a rounding error in the block size calculation.
Submitted by: tjr
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/openssh/scp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/openssh/scp.c b/crypto/openssh/scp.c index 921ffee..9073dda 100644 --- a/crypto/openssh/scp.c +++ b/crypto/openssh/scp.c @@ -76,6 +76,7 @@ #include "includes.h" RCSID("$OpenBSD: scp.c,v 1.91 2002/06/19 00:27:55 deraadt Exp $"); +RCSID("$FreeBSD$"); #include "xmalloc.h" #include "atomicio.h" @@ -1039,8 +1040,7 @@ allocbuf(bp, fd, blksize) if (stb.st_blksize == 0) size = blksize; else - size = blksize + (stb.st_blksize - blksize % stb.st_blksize) % - stb.st_blksize; + size = roundup(stb.st_blksize, blksize); #else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ size = blksize; #endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ |