summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/scp.c b/scp.c
index 4214e0c53..eb5f23e40 100644
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
75 */ 75 */
76 76
77#include "includes.h" 77#include "includes.h"
78RCSID("$OpenBSD: scp.c,v 1.94 2002/11/27 17:53:35 markus Exp $"); 78RCSID("$OpenBSD: scp.c,v 1.95 2002/12/05 11:08:35 markus Exp $");
79 79
80#include "xmalloc.h" 80#include "xmalloc.h"
81#include "atomicio.h" 81#include "atomicio.h"
@@ -1058,11 +1058,9 @@ allocbuf(bp, fd, blksize)
1058 run_err("fstat: %s", strerror(errno)); 1058 run_err("fstat: %s", strerror(errno));
1059 return (0); 1059 return (0);
1060 } 1060 }
1061 if (stb.st_blksize == 0) 1061 size = roundup(stb.st_blksize, blksize);
1062 if (size == 0)
1062 size = blksize; 1063 size = blksize;
1063 else
1064 size = blksize + (stb.st_blksize - blksize % stb.st_blksize) %
1065 stb.st_blksize;
1066#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */ 1064#else /* HAVE_STRUCT_STAT_ST_BLKSIZE */
1067 size = blksize; 1065 size = blksize;
1068#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */ 1066#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */