diff options
author | Jim Meyering <jim@meyering.net> | 1996-04-03 12:20:24 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-04-03 12:20:24 +0000 |
commit | 3191649a85a127d3112ddae1d893346caeec982a (patch) | |
tree | 846b0393a08c591d0f6722915ca16bd6bbb13e32 /src/cp.c | |
parent | 4325d27dddd3e17b4ec7a1baeef1820e073c8271 (diff) | |
download | coreutils-3191649a85a127d3112ddae1d893346caeec982a.tar.xz |
(copy_reg): Use `ST_NBLOCKS (sb) * 512', not `sb.st_blocks *
DEV_BSIZE.' From H.J. Lu (hjl@lucon.org).
Diffstat (limited to 'src/cp.c')
-rw-r--r-- | src/cp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1242,7 +1242,7 @@ copy_reg (char *src_path, char *dst_path) be needed for a file of its size, then at least one of the blocks in the file is a hole. */ /* FIXME: isn't there risk of overflow here? */ - if (S_ISREG (sb.st_mode) && sb.st_size > sb.st_blocks * DEV_BSIZE) + if (S_ISREG (sb.st_mode) && sb.st_size > ST_NBLOCKS (sb) * 512) make_holes = 1; } #endif |